Skip to content

Commit a8c7d61

Browse files
illeatmyhatclaudevisahak
authored
refactor(platform-integrations): namespace shared lib under lib/evolve-lite/ (#258)
* refactor(platform-integrations): namespace shared lib under lib/evolve-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> * fix(platform-integrations): correct codex status label and bob README 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> * fix(platform-integrations): correct bob uninstall + global custom-mode path Two bob-installer correctness fixes surfaced while wiring up global installs: - Uninstall now removes the namespaced shared lib at `.bob/lib/evolve-lite/`. After the lib/ rename it is no longer an evolve-prefixed top-level dir, so the generic purge loop missed it and left artifacts behind (gaodan-fang's PR #258 review). Adds a regression test. - Install/uninstall/status now resolve the custom-mode (and full-mode MCP) file by scope: Bob reads GLOBAL modes from `~/.bob/settings/custom_modes.yaml` but PROJECT modes from `<project>/.bob/custom_modes.yaml`. The installer previously always wrote the top-level path, so a global install (`--dir $HOME`) landed in a file Bob never loads. Uninstall also strips the legacy top-level file so pre-fix installs get cleaned up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Punleuk Oum <5661986+illeatmyhat@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Vatche Isahagian <visahak@users.noreply.github.com>
1 parent c57148b commit a8c7d61

66 files changed

Lines changed: 274 additions & 278 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

platform-integrations/INSTALL_SPEC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Source: `platform-integrations/codex/plugins/evolve-lite/`
112112
Target: project directory
113113

114114
1. Copy `platform-integrations/codex/plugins/evolve-lite/``plugins/evolve-lite/` in the target project
115-
2. Copy shared lib from `platform-integrations/claude/plugins/evolve-lite/lib/``plugins/evolve-lite/lib/`
115+
2. Copy shared lib from `platform-integrations/codex/plugins/evolve-lite/lib/evolve-lite/``plugins/evolve-lite/lib/evolve-lite/`
116116
3. Upsert plugin entry `evolve-lite` into `.agents/plugins/marketplace.json`
117117
4. Upsert a `UserPromptSubmit` hook into `.codex/hooks.json` that runs the Evolve recall helper script by walking upward from the current working directory until it finds `plugins/evolve-lite/skills/recall/scripts/retrieve_entities.py` (does not require `git`)
118118
5. Print post-install guidance that automatic recall requires `~/.codex/config.toml` to include:

platform-integrations/bob/evolve-lite/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ bash platform-integrations/install.sh install bob lite
2020

2121
This installs:
2222
- 6 skills in `~/.bob/skills/`
23-
- Shared library in `~/.bob/evolve-lib/`
23+
- Shared library in `~/.bob/lib/evolve-lite/`
2424
- Custom mode configuration
2525

2626
## How It Works

platform-integrations/bob/evolve-lite/lib/__init__.py renamed to platform-integrations/bob/evolve-lite/lib/evolve-lite/__init__.py

File renamed without changes.

platform-integrations/bob/evolve-lite/lib/audit.py renamed to platform-integrations/bob/evolve-lite/lib/evolve-lite/audit.py

File renamed without changes.

platform-integrations/bob/evolve-lite/lib/config.py renamed to platform-integrations/bob/evolve-lite/lib/evolve-lite/config.py

File renamed without changes.

platform-integrations/bob/evolve-lite/lib/entity_io.py renamed to platform-integrations/bob/evolve-lite/lib/evolve-lite/entity_io.py

File renamed without changes.

platform-integrations/bob/evolve-lite/skills/evolve-lite-learn/scripts/save_entities.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,14 @@
1111
from pathlib import Path
1212

1313
# Walk up from the script location to find the installed plugin lib directory.
14-
# claude/claw-code/codex/bob all ship a sibling lib/ next to skills/; bob's
15-
# installer copies it to .bob/evolve-lib/, hence both names are checked.
14+
# Every host installs the shared lib under lib/evolve-lite/ so multiple
15+
# plugins can coexist side by side (e.g. .bob/lib/evolve-lite/).
1616
_script = Path(__file__).resolve()
1717
_lib = None
1818
for _ancestor in _script.parents:
19-
for _candidate in (_ancestor / "lib", _ancestor / "evolve-lib"):
20-
if (_candidate / "entity_io.py").is_file():
21-
_lib = _candidate
22-
break
23-
if _lib is not None:
19+
_candidate = _ancestor / "lib" / "evolve-lite"
20+
if (_candidate / "entity_io.py").is_file():
21+
_lib = _candidate
2422
break
2523
if _lib is None:
2624
raise ImportError(f"Cannot find plugin lib directory above {_script}")

platform-integrations/bob/evolve-lite/skills/evolve-lite-provenance/scripts/log_influence.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,14 @@
1717
from pathlib import Path
1818

1919
# Walk up from the script location to find the installed plugin lib directory.
20-
# claude/claw-code/codex/bob all ship a sibling lib/ next to skills/; bob's
21-
# installer copies it to .bob/evolve-lib/, hence both names are checked.
20+
# Every host installs the shared lib under lib/evolve-lite/ so multiple
21+
# plugins can coexist side by side (e.g. .bob/lib/evolve-lite/).
2222
_script = Path(__file__).resolve()
2323
_lib = None
2424
for _ancestor in _script.parents:
25-
for _candidate in (_ancestor / "lib", _ancestor / "evolve-lib"):
26-
if (_candidate / "entity_io.py").is_file():
27-
_lib = _candidate
28-
break
29-
if _lib is not None:
25+
_candidate = _ancestor / "lib" / "evolve-lite"
26+
if (_candidate / "entity_io.py").is_file():
27+
_lib = _candidate
3028
break
3129
if _lib is None:
3230
raise ImportError(f"Cannot find plugin lib directory above {_script}")

platform-integrations/bob/evolve-lite/skills/evolve-lite-publish/scripts/publish.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,14 @@
1010
from pathlib import Path, PurePath
1111

1212
# Walk up from the script location to find the installed plugin lib directory.
13-
# claude/claw-code/codex/bob all ship a sibling lib/ next to skills/; bob's
14-
# installer copies it to .bob/evolve-lib/, hence both names are checked.
13+
# Every host installs the shared lib under lib/evolve-lite/ so multiple
14+
# plugins can coexist side by side (e.g. .bob/lib/evolve-lite/).
1515
_script = Path(__file__).resolve()
1616
_lib = None
1717
for _ancestor in _script.parents:
18-
for _candidate in (_ancestor / "lib", _ancestor / "evolve-lib"):
19-
if (_candidate / "entity_io.py").is_file():
20-
_lib = _candidate
21-
break
22-
if _lib is not None:
18+
_candidate = _ancestor / "lib" / "evolve-lite"
19+
if (_candidate / "entity_io.py").is_file():
20+
_lib = _candidate
2321
break
2422
if _lib is None:
2523
raise ImportError(f"Cannot find plugin lib directory above {_script}")

platform-integrations/bob/evolve-lite/skills/evolve-lite-recall/scripts/retrieve_entities.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@
77
from pathlib import Path
88

99
# Walk up from the script location to find the installed plugin lib directory.
10-
# claude/claw-code/codex/bob all ship a sibling lib/ next to skills/; bob's
11-
# installer copies it to .bob/evolve-lib/, hence both names are checked.
10+
# Every host installs the shared lib under lib/evolve-lite/ so multiple
11+
# plugins can coexist side by side (e.g. .bob/lib/evolve-lite/).
1212
_script = Path(__file__).resolve()
1313
_lib = None
1414
for _ancestor in _script.parents:
15-
for _candidate in (_ancestor / "lib", _ancestor / "evolve-lib"):
16-
if (_candidate / "entity_io.py").is_file():
17-
_lib = _candidate
18-
break
19-
if _lib is not None:
15+
_candidate = _ancestor / "lib" / "evolve-lite"
16+
if (_candidate / "entity_io.py").is_file():
17+
_lib = _candidate
2018
break
2119
if _lib is None:
2220
raise ImportError(f"Cannot find plugin lib directory above {_script}")

0 commit comments

Comments
 (0)