Rename Kaizen to Evolve#108
Conversation
|
Important Review skippedToo many files! This PR contains 160 files, which is 10 over the limit of 150. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (160)
You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughA comprehensive project rebranding from "Kaizen" to "Evolve" affecting package names, class identifiers, environment variables, configuration defaults, directory structures, CLI commands, tests, documentation, and platform integration files across the entire codebase. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Actionable comments posted: 11
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
platform-integrations/claude/plugins/altk-evolve-lite/skills/recall/SKILL.md (1)
24-29:⚠️ Potential issue | 🟡 MinorAdd a language identifier to the fenced code block.
This currently triggers markdownlint MD040.
Proposed fix
-``` +```text .altk-evolve/entities/ guideline/ use-context-managers-for-file-operations.md cache-api-responses-locally.md</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@platform-integrations/claude/plugins/altk-evolve-lite/skills/recall/SKILL.md
around lines 24 - 29, The fenced code block in SKILL.md containing the directory
listing (the lines starting with ".altk-evolve/entities/") lacks a language
identifier and triggers markdownlint MD040; update that triple-backtick fence to
include a language tag (e.g., changetotext) around the block so the
snippet is marked as plain text and MD040 is satisfied.</details> </blockquote></details> <details> <summary>platform-integrations/claude/plugins/altk-evolve-lite/lib/entity_io.py (1)</summary><blockquote> `56-82`: _⚠️ Potential issue_ | _🟡 Minor_ **Docstring paths don't match code paths.** The docstrings reference `.altk-evolve/entities/` (with hyphen), but the code uses `.altk_evolve/entities` (with underscore). This inconsistency could confuse users reading the documentation. <details> <summary>Proposed fix to align docstrings with code</summary> ```diff def find_entities_dir(): """Locate the entities directory. Search order: 1. ``ALTK_EVOLVE_ENTITIES_DIR`` env var (authoritative, no fallback) - 2. ``{CLAUDE_PROJECT_ROOT}/.altk-evolve/entities/`` - 3. ``.altk-evolve/entities/`` (cwd) + 2. ``{CLAUDE_PROJECT_ROOT}/.altk_evolve/entities/`` + 3. ``.altk_evolve/entities/`` (cwd) Returns: Path to the directory if it exists, else ``None``. """ ``` </details> <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@platform-integrations/claude/plugins/altk-evolve-lite/lib/entity_io.py` around lines 56 - 82, The docstring for find_entities_dir references directory paths with a hyphen (e.g. ".altk-evolve/entities/") but the implementation builds paths using an underscore (".altk_evolve/entities"); update the docstring to match the actual paths used by the function (or change the Path construction if the hyphenated name is the intended directory). Specifically, edit the find_entities_dir docstring to list the same candidates returned by the code (ALTK_EVOLVE_ENTITIES_DIR, {CLAUDE_PROJECT_ROOT}/.altk_evolve/entities/, .altk_evolve/entities/) so the documentation matches the behavior of find_entities_dir and the environment variable handling logic. ``` </details> </blockquote></details> <details> <summary>platform-integrations/INSTALL_SPEC.md (1)</summary><blockquote> `164-176`: _⚠️ Potential issue_ | _🟡 Minor_ **Align the sentinel examples with the actual markers.** The installer emits `# >>>altk-evolve:{slug}<<<` / `# <<<altk-evolve:{slug}<<<`, not `# >>>altk-evolve-lite<<<`. Anyone following this spec for replace/uninstall logic will miss the real sentinel blocks. <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@platform-integrations/INSTALL_SPEC.md` around lines 164 - 176, The sentinel examples use the wrong static token; update the spec to match the installer's actual markers by using the dynamic sentinel format "# >>>altk-evolve:{slug}<<<" and "# <<<altk-evolve:{slug}<<<" (e.g., "# >>>altk-evolve:altk-evolve-lite<<<" / "# <<<altk-evolve:altk-evolve-lite<<<"), and adjust the example YAML block and the “check if sentinel exists” description to state checking for "# >>>altk-evolve:{slug}<<<" and replacing the block between those two markers or appending that sentinel block if not found. ``` </details> </blockquote></details> </blockquote></details>🟡 Minor comments (18)
platform-integrations/roo/altk-evolve-lite/skills/altk-evolve-learn/scripts/save.py-3-4 (1)
3-4:⚠️ Potential issue | 🟡 MinorFix inconsistency between docstring and implementation.
The docstring references
.altk-evolve/entities.json(with hyphen), but the implementation at line 47 uses.altk_evolve(with underscore). Ensure the docstring matches the actual directory name used in the code.📝 Proposed fix to align docstring with implementation
""" ALTK-Evolve Skill: Learn (Stage 2 Filesystem Backend) -Reads extracted entities from stdin and saves them to .altk-evolve/entities.json. +Reads extracted entities from stdin and saves them to .altk_evolve/entities.json. Zero dependencies (standard library only). """🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@platform-integrations/roo/altk-evolve-lite/skills/altk-evolve-learn/scripts/save.py` around lines 3 - 4, Update the module docstring in save.py so it matches the actual directory used by the implementation: change the referenced path from ".altk-evolve/entities.json" to ".altk_evolve/entities.json" (the underscore variant used in the code at the path construction/usage around the save logic). Ensure the docstring text and any top-of-file description consistently use ".altk_evolve/entities.json" to match the implementation..gitignore-9-15 (1)
9-15:⚠️ Potential issue | 🟡 MinorFix directory naming in .gitignore line 15.
Line 15 uses
/.altk-evolve(hyphen) but should be/.altk_evolve(underscore) to match the actual directory names created by the codebase. Python code consistently uses.altk_evolvefor storing entities, trajectories, and other data. Line 9'saltk_evolve_dataalready uses the underscore convention correctly.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.gitignore around lines 9 - 15, Replace the incorrect directory pattern '/.altk-evolve' in the .gitignore with the underscore variant '/.altk_evolve' so the ignore entry matches the actual directories created by the codebase (aligns with existing 'altk_evolve_data' and Python usage of '.altk_evolve').docs/POLICIES.md-7-7 (1)
7-7:⚠️ Potential issue | 🟡 MinorFix the path in the documentation: change
altk-evolve/schema/policy.pytoaltk_evolve/schema/policy.py.The actual directory uses underscores, not hyphens. The file is located at
altk_evolve/schema/policy.py, so the reference in line 7 should be updated to match the correct module path.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/POLICIES.md` at line 7, Update the incorrect module reference in the documentation: replace the string "altk-evolve/schema/policy.py" with the correct module path "altk_evolve/schema/policy.py" in POLICIES.md (the line mentioning entities with type="policy") so the doc matches the actual package name.AGENTS.md-26-26 (1)
26-26:⚠️ Potential issue | 🟡 MinorFix source-path examples to use
altk_evolve(underscore), notaltk-evolve.Line 26 and Line 46 currently point to a hyphenated source path, which does not match the Python package directory naming used in this repo and can break copy/paste onboarding steps.
🛠️ Proposed doc fix
-├── altk-evolve (Primary Source Root) +├── altk_evolve (Primary Source Root) -cp .env.example .env # Configure any environment variables, defined in `./altk-evolve/config` +cp .env.example .env # Configure any environment variables, defined in `./altk_evolve/config`Also applies to: 46-46
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@AGENTS.md` at line 26, Replace the hyphenated package name in the source-path examples: change all occurrences of the string "altk-evolve" to the correct Python package directory name "altk_evolve" in the AGENTS.md source-path examples (both instances referenced in the comment) so copy/paste onboarding uses the actual package name..env.example-14-14 (1)
14-14:⚠️ Potential issue | 🟡 MinorAdd trailing newline at end of
.env.example.The file currently has no ending blank line, which triggers dotenv lint warnings.
Proposed fix
# Optional: Advanced Settings # ALTK_EVOLVE_CLUSTERING_THRESHOLD=0.80 +🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.env.example at line 14, Add a trailing newline to the end of the .env.example file so the final line ("ALTK_EVOLVE_CLUSTERING_THRESHOLD=0.80" or its commented form) ends with a newline character; simply ensure the file terminates with a blank line after the last line (the ALTK_EVOLVE_CLUSTERING_THRESHOLD entry) to satisfy dotenv linting.platform-integrations/roo/altk-evolve-lite/skills/altk-evolve-recall/scripts/get.py-4-4 (1)
4-4:⚠️ Potential issue | 🟡 MinorDocstring path is inconsistent with runtime path.
Line 4 says
.altk-evolve/entities.json, but Line 23 reads from.altk_evolve/entities.json. This can confuse users.Suggested fix
-Reads entities from .altk-evolve/entities.json and outputs them in a compact format. +Reads entities from .altk_evolve/entities.json and outputs them in a compact format.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@platform-integrations/roo/altk-evolve-lite/skills/altk-evolve-recall/scripts/get.py` at line 4, Docstring at the top of get.py references ".altk-evolve/entities.json" but the runtime code reads from ".altk_evolve/entities.json"; update the module docstring to mention ".altk_evolve/entities.json" so the path in the documentation matches the actual string literal used in the code (search for the ".altk_evolve/entities.json" occurrence in get.py and change the docstring text accordingly).platform-integrations/claude/plugins/altk-evolve-lite/skills/save-trajectory/scripts/save_trajectory.py-5-5 (1)
5-5:⚠️ Potential issue | 🟡 MinorDocstring path doesn't match implementation.
The docstring says
.altk-evolve/trajectories/(hyphenated), but the actual implementation at Lines 50 and 52 uses.altk_evolve/trajectories/(underscored). Update the docstring to match the code.📝 Proposed fix
""" Save Trajectory Script Reads a trajectory JSON from a file path argument (or stdin as fallback) -and writes it to the .altk-evolve/trajectories/ directory. +and writes it to the .altk_evolve/trajectories/ directory. """🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@platform-integrations/claude/plugins/altk-evolve-lite/skills/save-trajectory/scripts/save_trajectory.py` at line 5, The module docstring currently references the directory ".altk-evolve/trajectories/" which mismatches the implementation; update the docstring to refer to ".altk_evolve/trajectories/" (underscore) so it matches how the code constructs the path in this module (see usage in the save_trajectory logic that writes to the .altk_evolve/trajectories/ directory).docs/integrations/roo_code/index.md-10-10 (1)
10-10:⚠️ Potential issue | 🟡 MinorFix broken documentation link due to filename casing mismatch.
The link references
./ALTK-Evolve-export.yaml, but the actual file on disk is./Altk-Evolve-export.yaml(note the mixed-case "Altk" instead of uppercase "ALTK"). On case-sensitive filesystems, this link will be broken. Update the link to match the actual filename.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/integrations/roo_code/index.md` at line 10, The Markdown link currently points to "./ALTK-Evolve-export.yaml" which does not match the actual filename "Altk-Evolve-export.yaml"; update the link target string in the docs link (the text matching `ALTK-Evolve-export.yaml`) to use the correct casing `Altk-Evolve-export.yaml` so the reference resolves on case-sensitive filesystems.examples/low_code/openai_agents_demo.py-4-9 (1)
4-9:⚠️ Potential issue | 🟡 MinorMove the environment check into
main()to comply with import-order rules.The file executes an environment check (lines 4–6) before module imports, which violates Ruff's E402 rule (
module-import-not-at-top-of-file) and PEP 8 conventions. All imports must appear at the top of the module.Proposed fix
import os import asyncio +import altk_evolve.auto # noqa: F401 +from altk_evolve.config.llm import llm_settings +from agents import Agent, Runner, function_tool, ModelSettings +from agents.extensions.models.litellm_model import LitellmModel -# Ensure ALTK_EVOLVE_AUTO_ENABLED is set -if os.environ.get("ALTK_EVOLVE_AUTO_ENABLED", "").lower() != "true": - print("WARNING: ALTK_EVOLVE_AUTO_ENABLED is not true") - -import altk_evolve.auto # noqa: F401 -from altk_evolve.config.llm import llm_settings - -from agents import Agent, Runner, function_tool, ModelSettings -from agents.extensions.models.litellm_model import LitellmModel - # Import tool from our local MCP server definition from local_mcp_server import add as mcp_add, multiply as mcp_multiply @@ async def main(): + # Ensure ALTK_EVOLVE_AUTO_ENABLED is set + if os.environ.get("ALTK_EVOLVE_AUTO_ENABLED", "").lower() != "true": + print("WARNING: ALTK_EVOLVE_AUTO_ENABLED is not true") + # Create agent with local tools model_name = os.environ.get("ALTK_EVOLVE_EXAMPLE_AGENT_MODEL") or llm_settings.tips_model🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/low_code/openai_agents_demo.py` around lines 4 - 9, The environment check for ALTK_EVOLVE_AUTO_ENABLED must be moved out of the top-level so imports remain at the top; remove the top-level os.environ check and instead add it inside a main() function (or existing entrypoint) that runs after the imports and before any use of altk_evolve.auto or llm_settings, and ensure main() is invoked under if __name__ == "__main__":; keep the imports (import altk_evolve.auto, from altk_evolve.config.llm import llm_settings) at the top, reference the ALTK_EVOLVE_AUTO_ENABLED env var inside main(), and print the same warning there if it is not "true".docs/installation/index.md-30-30 (1)
30-30:⚠️ Potential issue | 🟡 MinorFix typo in mode description.
Line 30 has a spelling error:
supprt→support.Proposed fix
-| `lite` | Install only the core components. Some platforms only supprt lite. | +| `lite` | Install only the core components. Some platforms only support lite. |🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/installation/index.md` at line 30, Update the table row describing the `lite` installation mode by fixing the spelling of "supprt" to "support" in the sentence "Install only the core components. Some platforms only support lite." Ensure the `lite` entry text exactly reads that corrected sentence so docs/installation index shows proper spelling.docs/index.md-2-2 (1)
2-2:⚠️ Potential issue | 🟡 MinorFix mixed emphasis markers to satisfy markdownlint (MD049).
Line 2 mixes asterisk and underscore emphasis markers, which triggers MD049. Use a consistent asterisk style.
Proposed fix
-***_Self-improving agents through iterations._*** +***Self-improving agents through iterations.***🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/index.md` at line 2, The heading uses mixed emphasis markers (***_Self-improving agents through iterations._***); update it to use consistent asterisk emphasis only by removing the underscores so the text becomes wrapped solely with asterisks (e.g., ***Self-improving agents through iterations.***), ensuring MD049 is satisfied.altk_evolve/auto/__init__.py-146-146 (1)
146-146:⚠️ Potential issue | 🟡 MinorInconsistent default project name with documentation.
The default project name
altk_evolve-agent(with underscore) doesn't match the documented defaultaltk-evolve-agent(with hyphen) inCONFIGURATION.mdline 156. For consistency with other user-facing identifiers that use hyphens (e.g.,altk-evolvenamespace), consider usingaltk-evolve-agent.Proposed fix
- project = project or os.environ.get("ALTK_EVOLVE_TRACING_PROJECT", os.environ.get("PHOENIX_PROJECT_NAME", "altk_evolve-agent")) + project = project or os.environ.get("ALTK_EVOLVE_TRACING_PROJECT", os.environ.get("PHOENIX_PROJECT_NAME", "altk-evolve-agent"))🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@altk_evolve/auto/__init__.py` at line 146, The default project string used when setting project (the assignment to project in auto.__init__.py) is inconsistent with docs: change the fallback value from "altk_evolve-agent" to "altk-evolve-agent" so project = project or os.environ.get("ALTK_EVOLVE_TRACING_PROJECT", os.environ.get("PHOENIX_PROJECT_NAME", "altk-evolve-agent")), ensuring the code's default matches CONFIGURATION.md and other hyphenated identifiers.platform-integrations/claude/plugins/altk-evolve-lite/lib/entity_io.py-84-103 (1)
84-103:⚠️ Potential issue | 🟡 MinorSame docstring inconsistency in
get_default_entities_dir.The docstring mentions
.altk-evolve/entities/(hyphen) while the code creates.altk_evolve/entities(underscore).Proposed fix
def get_default_entities_dir(): """Return (and create) the default entities directory. Prefers ``ALTK_EVOLVE_ENTITIES_DIR``, then - ``{CLAUDE_PROJECT_ROOT}/.altk-evolve/entities/``, falls back to - ``.altk-evolve/entities/``. + ``{CLAUDE_PROJECT_ROOT}/.altk_evolve/entities/``, falls back to + ``.altk_evolve/entities/``. """🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@platform-integrations/claude/plugins/altk-evolve-lite/lib/entity_io.py` around lines 84 - 103, Docstring for get_default_entities_dir incorrectly references ".altk-evolve/entities/" (hyphen) but the implementation creates ".altk_evolve/entities" (underscore); update the docstring to match the actual path used by the function (".altk_evolve/entities/") and ensure the order of precedence described (ALTK_EVOLVE_ENTITIES_DIR, then {CLAUDE_PROJECT_ROOT}/.altk_evolve/entities/, then .altk_evolve/entities/) matches the code in get_default_entities_dir.docs/examples/hello_world/index.md-26-28 (1)
26-28:⚠️ Potential issue | 🟡 MinorAdd language identifiers to fenced code blocks.
Line 26 and Line 38 use unlabeled fenced blocks, which triggers markdownlint MD040 and can reduce readability in docs tooling.
Proposed fix
-``` +```text Set up the python environment for this project@@
-+text
This is incorrect. This project is supposed to be managed byuv.Also applies to: 38-40
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/hello_world/index.md` around lines 26 - 28, The two unlabeled fenced code blocks containing the lines "Set up the python environment for this project" and "This is incorrect. This project is supposed to be managed by `uv`." need language identifiers to satisfy markdownlint MD040; update those fenced blocks in docs/examples/hello_world/index.md to use a language tag (e.g., ```text) so the blocks become labeled and tooling renders them correctly.docs/examples/hello_world/index.md-45-45 (1)
45-45:⚠️ Potential issue | 🟡 MinorFix
.venv/uv.lockwording for accuracy.Line 45 says
uv.lockis a folder, but it is a file.Proposed fix
-In the future, Bob should remember via ALTK-Evolve-Lite skills that `uv` is used for this project and not make the same mistake. This can be tested in this toy project by deleting the `.venv` and `uv.lock` folder and trying the same utterance again. +In the future, Bob should remember via ALTK-Evolve-Lite skills that `uv` is used for this project and not make the same mistake. This can be tested in this toy project by deleting the `.venv` directory and `uv.lock` file, then trying the same utterance again.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/hello_world/index.md` at line 45, Update the sentence that describes `uv.lock` as a folder to correctly call it a file: replace the phrase "the `.venv` and `uv.lock` folder" with wording like "the `.venv` directory and the `uv.lock` file" so both artifacts are accurately described (target the sentence mentioning `.venv` and `uv.lock` in the hello_world example text).platform-integrations/INSTALL_SPEC.md-103-108 (1)
103-108:⚠️ Potential issue | 🟡 MinorFix the Roo bootstrap format in the spec.
The spec says a missing
.roomodesfile is created as JSON, butinstall.shcurrently seeds it viamerge_yaml_custom_mode(...)and reports(YAML). This will send readers looking for the wrong file format.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@platform-integrations/INSTALL_SPEC.md` around lines 103 - 108, The spec incorrectly states that a missing `.roomodes` is created as JSON while the bootstrap code uses merge_yaml_custom_mode(...) and seeds it as YAML; update the INSTALL_SPEC.md text describing step 3 to reflect that a non-existent `.roomodes` will be created/seeded in YAML format (and note detection still tries JSON first), so the doc matches the actual behavior of merge_yaml_custom_mode and the install.sh reporting "(YAML)".platform-integrations/INSTALL_SPEC.md-81-96 (1)
81-96:⚠️ Potential issue | 🟡 MinorDocument the Bob shared-library artifact.
platform-integrations/install.shnow copies.bob/altk-evolve-libduring install and removes it during uninstall, but this spec never mentions that directory. As written, the install/uninstall contract is incomplete for anyone implementing or validating the installer.Also applies to: 125-130
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@platform-integrations/INSTALL_SPEC.md` around lines 81 - 96, The spec omits the bob shared-library artifact `.bob/altk-evolve-lib` that install.sh copies and uninstall removes; update the Bob Lite and Full sections to document this artifact by adding a step like "Copy `altk-evolve-lib/` → `.bob/altk-evolve-lib/` (merge, idempotent)" and note that uninstall removes `.bob/altk-evolve-lib`; ensure the Full Mode section mirrors this and that the JSON/YAML strategy notes cover merge/idempotency for this directory (apply same addition for the later 125-130 section).docs/LOW_CODE_TRACING.md-279-279 (1)
279-279:⚠️ Potential issue | 🟡 MinorChange the module name from
altk-evolve.autotoaltk_evolve.autoin this troubleshooting entry.The documentation lists
altk-evolve.auto, but the actual package uses underscores (altk_evolve.auto). This troubleshooting row won't match the realModuleNotFoundErrorusers will encounter, since all imports throughout the codebase usealtk_evolve.auto.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/LOW_CODE_TRACING.md` at line 279, Update the troubleshooting table entry that currently lists the module name `altk-evolve.auto` to use the correct package name `altk_evolve.auto`; locate the table row containing the string `ModuleNotFoundError: altk-evolve.auto` and replace that module token with `altk_evolve.auto` so it matches the actual import used across the codebase.🧹 Nitpick comments (4)
altk_evolve/backend/postgres.py (1)
231-234: Chain the exception to preserve the original traceback.When re-raising as
ALTKEvolveException, the originalValueErrorcontext is lost. Useraise ... from eto maintain the exception chain for better debugging.♻️ Proposed fix
def delete_entity_by_id(self, namespace_id: str, entity_id: str): try: entity_id_int = int(entity_id) - except ValueError: - raise ALTKEvolveException(f"Invalid entity ID: {entity_id}. Entity IDs must be numeric.") + except ValueError as e: + raise ALTKEvolveException(f"Invalid entity ID: {entity_id}. Entity IDs must be numeric.") from e🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@altk_evolve/backend/postgres.py` around lines 231 - 234, The current ValueError raised when converting entity_id with int(entity_id) is re-raised as ALTKEvolveException without preserving the original traceback; catch the ValueError as a variable (e) and re-raise using "raise ALTKEvolveException(f'Invalid entity ID: {entity_id}. Entity IDs must be numeric.') from e" so the exception chain is preserved—update the try/except around entity_id_int = int(entity_id) accordingly.tests/unit/test_mcp_server.py (1)
17-98: Add@pytest.mark.unitmarkers to test functions.The test functions in this file are missing the
@pytest.mark.unitmarker that is present in other unit test files. As per coding guidelines, unit tests should use theunitmarker.Suggested fix to add test markers
+@pytest.mark.unit def test_save_trajectory_metadata_injection(mock_get_client): # Mock tip generation to prevent actual LLM calls+@pytest.mark.unit def test_create_entity_metadata_injection_manual_guideline(mock_get_client): mock_update = EntityUpdate(id="123", type="guideline", content="docstrings", event="ADD", metadata={"creation_mode": "manual"})+@pytest.mark.unit def test_create_entity_metadata_injection_manual_policy(mock_get_client): mock_update = EntityUpdate(id="123", type="policy", content="PR reviews", event="ADD", metadata={"creation_mode": "manual"})+@pytest.mark.unit def test_create_entity_no_metadata_injection_for_other_types(mock_get_client): mock_update = EntityUpdate(id="123", type="log", content="App started", event="ADD", metadata={})As per coding guidelines:
tests/**/*.py: Use pytest markersunitfor unit tests.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/unit/test_mcp_server.py` around lines 17 - 98, Add the pytest unit marker to the four test functions (test_save_trajectory_metadata_injection, test_create_entity_metadata_injection_manual_guideline, test_create_entity_metadata_injection_manual_policy, test_create_entity_no_metadata_injection_for_other_types) by decorating each with `@pytest.mark.unit`; also ensure pytest is imported at the top of the file if it's not already (add "import pytest"). This will align these tests with the project's unit-test marker convention.platform-integrations/claude/plugins/altk-evolve-lite/README.md (1)
92-97: Add language specifier to fenced code block.The directory structure code block is missing a language identifier. Use
textfor plain directory listings.Proposed fix
-``` +```text .altk-evolve/entities/ guideline/ use-python-pil-for-image-metadata-extraction.md cache-api-responses-locally.md</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@platform-integrations/claude/plugins/altk-evolve-lite/README.mdaround lines
92 - 97, Update the fenced code block in README.md that shows the directory
listing to include a language specifier; change the triple-backtick fence
preceding ".altk-evolve/entities/" to use "text" (i.e., ```text) so the
directory structure snippet is rendered as plain text, leaving the contents
unchanged.</details> </blockquote></details> <details> <summary>platform-integrations/INSTALL_SPEC.md (1)</summary><blockquote> `24-30`: **Add fence languages to these blocks.** Both fences are unlabeled, and markdownlint is already warning on them. `text`/`bash` here would keep the doc lint-clean. Also applies to: 116-118 <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@platform-integrations/INSTALL_SPEC.mdaround lines 24 - 30, The two
unlabeled Markdown code fences containing the GitHub archive URLs (the lines
with "https://github.com/${ALTK_EVOLVE_REPO}/archive/refs/heads/main.tar.gz" and
"https://github.com/${ALTK_EVOLVE_REPO}/archive/refs/tags/v${VERSION}.tar.gz")
should be given a fence language (e.g., bash or text) to satisfy markdownlint;
update those fenced blocks to use a language tag likebash (ortext) and
make the same change for the other similar fenced block later in the file (the
one around the pinned version example).</details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against the current code and only fix it if needed.
Inline comments:
In@altk_evolve/db/sqlite_manager.py:
- Line 31: The code accepts URI-style DB sources into self.db_path but opens the
connection with sqlite3.connect(...) without uri=True, so URI strings are
treated as plain file paths; update the connection logic (where sqlite3.connect
is called) to detect URI-style paths (e.g. self.db_path.startswith("file:") or
when ALTK_EVOLVE_SQLITE_URI is used) and pass uri=True to sqlite3.connect (e.g.,
sqlite3.connect(self.db_path, uri=True, check_same_thread=False)); ensure
detection is based on self.db_path and keep existing options like
check_same_thread=False.In
@Dockerfile.core:
- Line 21: The Dockerfile's COPY instruction uses the wrong source directory
name; update the COPY line that currently references "altk-evolve" so it uses
the actual repository directory "altk_evolve" (e.g., change the COPY source to
altk_evolve and match the destination accordingly) to ensure the build can find
and copy the directory.In
@docs/installation/index.md:
- Line 18: The usage example currently shows short flags "-platform" and "-mode"
which are inconsistent with the long-form flags used elsewhere; update the
example string "./install.sh install -platform {bob,roo,claude,all} -mode
{lite,full} [--dry-run]" to use the long-form flags "--platform" and "--mode" so
it matches the documented form (retain "--dry-run" as-is).In
@MANIFEST.in:
- Line 1: MANIFEST.in currently uses the wrong package directory name; update
the include pattern from "altk-evolve" to the actual package directory
"altk_evolve" so template files are packaged (replace the line
recursive-include altk-evolve *.jinja2withrecursive-include altk_evolve *.jinja2in MANIFEST.in).In
@platform-integrations/claude/marketplace.json:
- Around line 10-16: The marketplace.json entry for the plugin "altk-evolve" has
a mismatched source path ("source": "./plugins/altk-evolve") that doesn't exist;
update the "source" field in marketplace.json to point to the actual directory
("./plugins/altk-evolve-lite") or rename the plugin directory to match
"altk-evolve" so the source path is valid; specifically edit the "source" value
in marketplace.json (the JSON object containing "name": "altk-evolve") to
reference the true plugin folder name.In
@platform-integrations/claude/plugins/altk-evolve-lite/README.md:
- Line 33: The README's documented directory paths use hyphens (e.g.,
.altk-evolve/entities/) but the implementation in entity_io.py actually
creates and reads.altk_evolve/entities/(underscore); update the README.md to
use the underscore-based paths to match the code (replace all occurrences of
.altk-evolve/...with.altk_evolve/...in the README sections called out)
or, if you prefer changing code, modify entity_io.py so its created/required
directory names use the hyphen-based.altk-evolve/entities/consistently;
ensure the chosen path is used everywhere (entity_io.py functions that
create/read directories and all README references) so docs and implementation
match.In
@platform-integrations/claude/plugins/altk-evolve-lite/skills/save-trajectory/SKILL.md:
- Line 11: Update the SKILL.md documentation to match the implementation by
replacing all occurrences of the directory path string
.altk-evolve/trajectories(and any.altk-evolvevariants) with
.altk_evolve/trajectories(underscore instead of hyphen) across the file,
including the places you noted around lines 11, 114, 118–119, 125–126, 135, and
143 so the documented path matches thesave_trajectory.pyimplementation.In
@platform-integrations/install.sh:
- Around line 143-145: Update the installer to migrate legacy Kaizen identifiers
by detecting legacy values ("kaizen" and "kaizen-lite") where the script
currently uses BOB_SLUG, ROO_SLUG and CLAUDE_PLUGIN and rewrite or remove them
during install/uninstall: probe existing YAML sentinel blocks and
mcpServers.kaizen keys, replace those legacy sentinel blocks with the new
altk-evolve-lite identifiers (or remove duplicates), update mcpServers.kaizen ->
mcpServers.altk-evolve-lite (or delete the old key), and remove references to
the legacy Claude plugin so the new CLAUDE_PLUGIN value isn't duplicated; apply
the same migration logic to the other referenced sections (around the indicated
ranges) so re-running the installer performs an in-place rename rather than
creating duplicates.In
@README.md:
- Line 44: The Quick Start command contains an incorrect package path string
"altk-evolve/frontend/..."; update that command to use the correct package path
"altk_evolve/frontend/..." (i.e., replace the hyphen with an underscore) so the
CLI invocationuv run fastmcp run altk_evolve/frontend/mcp/mcp_server.py --transport sse --port 8201points to the real module.In
@tests/platform_integrations/conftest.py:
- Around line 219-220: The start/end sentinel helpers use the namespace
altk_evolve (underscore) while assert_sentinel_block_exists expects altk-evolve
(hyphen); make them consistent by changing the start_sentinel and end_sentinel
construction in the helper to use "altk-evolve" (hyphen) so they match
assert_sentinel_block_exists and negative checks behave correctly; update the
f-strings building start_sentinel and end_sentinel (the variables named
start_sentinel and end_sentinel) to use the hyphenated namespace.In
@tests/unit/test_client.py:
- Around line 159-170: The test currently calls
altk_evolve_client.search_entities but is intended to validate the
get_all_entities wrapper; change the invocation to call
altk_evolve_client.get_all_entities(namespace_id="foobar", query="name") while
keeping the monkeypatched backend.search_entities implementation
(search_entities on BaseEntityBackend) so the wrapper delegates to it; assert
the returned list from get_all_entities (result[0].id == "1") to verify the
wrapper behavior.
Outside diff comments:
In@platform-integrations/claude/plugins/altk-evolve-lite/lib/entity_io.py:
- Around line 56-82: The docstring for find_entities_dir references directory
paths with a hyphen (e.g. ".altk-evolve/entities/") but the implementation
builds paths using an underscore (".altk_evolve/entities"); update the docstring
to match the actual paths used by the function (or change the Path construction
if the hyphenated name is the intended directory). Specifically, edit the
find_entities_dir docstring to list the same candidates returned by the code
(ALTK_EVOLVE_ENTITIES_DIR, {CLAUDE_PROJECT_ROOT}/.altk_evolve/entities/,
.altk_evolve/entities/) so the documentation matches the behavior of
find_entities_dir and the environment variable handling logic.In
@platform-integrations/claude/plugins/altk-evolve-lite/skills/recall/SKILL.md:
- Around line 24-29: The fenced code block in SKILL.md containing the directory
listing (the lines starting with ".altk-evolve/entities/") lacks a language
identifier and triggers markdownlint MD040; update that triple-backtick fence to
include a language tag (e.g., changetotext) around the block so the
snippet is marked as plain text and MD040 is satisfied.In
@platform-integrations/INSTALL_SPEC.md:
- Around line 164-176: The sentinel examples use the wrong static token; update
the spec to match the installer's actual markers by using the dynamic sentinel
format "# >>>altk-evolve:{slug}<<<" and "# <<<altk-evolve:{slug}<<<" (e.g., "#altk-evolve:altk-evolve-lite<<<" / "# <<<altk-evolve:altk-evolve-lite<<<"),
and adjust the example YAML block and the “check if sentinel exists” description
to state checking for "# >>>altk-evolve:{slug}<<<" and replacing the block
between those two markers or appending that sentinel block if not found.
Minor comments:
In @.env.example:
- Line 14: Add a trailing newline to the end of the .env.example file so the
final line ("ALTK_EVOLVE_CLUSTERING_THRESHOLD=0.80" or its commented form) ends
with a newline character; simply ensure the file terminates with a blank line
after the last line (the ALTK_EVOLVE_CLUSTERING_THRESHOLD entry) to satisfy
dotenv linting.In @.gitignore:
- Around line 9-15: Replace the incorrect directory pattern '/.altk-evolve' in
the .gitignore with the underscore variant '/.altk_evolve' so the ignore entry
matches the actual directories created by the codebase (aligns with existing
'altk_evolve_data' and Python usage of '.altk_evolve').In
@AGENTS.md:
- Line 26: Replace the hyphenated package name in the source-path examples:
change all occurrences of the string "altk-evolve" to the correct Python package
directory name "altk_evolve" in the AGENTS.md source-path examples (both
instances referenced in the comment) so copy/paste onboarding uses the actual
package name.In
@altk_evolve/auto/__init__.py:
- Line 146: The default project string used when setting project (the assignment
to project in auto.init.py) is inconsistent with docs: change the fallback
value from "altk_evolve-agent" to "altk-evolve-agent" so project = project or
os.environ.get("ALTK_EVOLVE_TRACING_PROJECT",
os.environ.get("PHOENIX_PROJECT_NAME", "altk-evolve-agent")), ensuring the
code's default matches CONFIGURATION.md and other hyphenated identifiers.In
@docs/examples/hello_world/index.md:
- Around line 26-28: The two unlabeled fenced code blocks containing the lines
"Set up the python environment for this project" and "This is incorrect. This
project is supposed to be managed byuv." need language identifiers to satisfy
markdownlint MD040; update those fenced blocks in
docs/examples/hello_world/index.md to use a language tag (e.g., ```text) so the
blocks become labeled and tooling renders them correctly.- Line 45: Update the sentence that describes
uv.lockas a folder to correctly
call it a file: replace the phrase "the.venvanduv.lockfolder" with
wording like "the.venvdirectory and theuv.lockfile" so both artifacts
are accurately described (target the sentence mentioning.venvanduv.lock
in the hello_world example text).In
@docs/index.md:
- Line 2: The heading uses mixed emphasis markers (Self-improving agents
through iterations.); update it to use consistent asterisk emphasis only by
removing the underscores so the text becomes wrapped solely with asterisks
(e.g., Self-improving agents through iterations.), ensuring MD049 is
satisfied.In
@docs/installation/index.md:
- Line 30: Update the table row describing the
liteinstallation mode by
fixing the spelling of "supprt" to "support" in the sentence "Install only the
core components. Some platforms only support lite." Ensure theliteentry text
exactly reads that corrected sentence so docs/installation index shows proper
spelling.In
@docs/integrations/roo_code/index.md:
- Line 10: The Markdown link currently points to "./ALTK-Evolve-export.yaml"
which does not match the actual filename "Altk-Evolve-export.yaml"; update the
link target string in the docs link (the text matching
ALTK-Evolve-export.yaml) to use the correct casingAltk-Evolve-export.yaml
so the reference resolves on case-sensitive filesystems.In
@docs/LOW_CODE_TRACING.md:
- Line 279: Update the troubleshooting table entry that currently lists the
module namealtk-evolve.autoto use the correct package name
altk_evolve.auto; locate the table row containing the string
ModuleNotFoundError: altk-evolve.autoand replace that module token with
altk_evolve.autoso it matches the actual import used across the codebase.In
@docs/POLICIES.md:
- Line 7: Update the incorrect module reference in the documentation: replace
the string "altk-evolve/schema/policy.py" with the correct module path
"altk_evolve/schema/policy.py" in POLICIES.md (the line mentioning entities with
type="policy") so the doc matches the actual package name.In
@examples/low_code/openai_agents_demo.py:
- Around line 4-9: The environment check for ALTK_EVOLVE_AUTO_ENABLED must be
moved out of the top-level so imports remain at the top; remove the top-level
os.environ check and instead add it inside a main() function (or existing
entrypoint) that runs after the imports and before any use of altk_evolve.auto
or llm_settings, and ensure main() is invoked under if name == "main":;
keep the imports (import altk_evolve.auto, from altk_evolve.config.llm import
llm_settings) at the top, reference the ALTK_EVOLVE_AUTO_ENABLED env var inside
main(), and print the same warning there if it is not "true".In
@platform-integrations/claude/plugins/altk-evolve-lite/lib/entity_io.py:
- Around line 84-103: Docstring for get_default_entities_dir incorrectly
references ".altk-evolve/entities/" (hyphen) but the implementation creates
".altk_evolve/entities" (underscore); update the docstring to match the actual
path used by the function (".altk_evolve/entities/") and ensure the order of
precedence described (ALTK_EVOLVE_ENTITIES_DIR, then
{CLAUDE_PROJECT_ROOT}/.altk_evolve/entities/, then .altk_evolve/entities/)
matches the code in get_default_entities_dir.In
@platform-integrations/claude/plugins/altk-evolve-lite/skills/save-trajectory/scripts/save_trajectory.py:
- Line 5: The module docstring currently references the directory
".altk-evolve/trajectories/" which mismatches the implementation; update the
docstring to refer to ".altk_evolve/trajectories/" (underscore) so it matches
how the code constructs the path in this module (see usage in the
save_trajectory logic that writes to the .altk_evolve/trajectories/ directory).In
@platform-integrations/INSTALL_SPEC.md:
- Around line 103-108: The spec incorrectly states that a missing
.roomodesis
created as JSON while the bootstrap code uses merge_yaml_custom_mode(...) and
seeds it as YAML; update the INSTALL_SPEC.md text describing step 3 to reflect
that a non-existent.roomodeswill be created/seeded in YAML format (and note
detection still tries JSON first), so the doc matches the actual behavior of
merge_yaml_custom_mode and the install.sh reporting "(YAML)".- Around line 81-96: The spec omits the bob shared-library artifact
.bob/altk-evolve-libthat install.sh copies and uninstall removes; update the
Bob Lite and Full sections to document this artifact by adding a step like "Copy
altk-evolve-lib/→.bob/altk-evolve-lib/(merge, idempotent)" and note that
uninstall removes.bob/altk-evolve-lib; ensure the Full Mode section mirrors
this and that the JSON/YAML strategy notes cover merge/idempotency for this
directory (apply same addition for the later 125-130 section).In
@platform-integrations/roo/altk-evolve-lite/skills/altk-evolve-learn/scripts/save.py:
- Around line 3-4: Update the module docstring in save.py so it matches the
actual directory used by the implementation: change the referenced path from
".altk-evolve/entities.json" to ".altk_evolve/entities.json" (the underscore
variant used in the code at the path construction/usage around the save logic).
Ensure the docstring text and any top-of-file description consistently use
".altk_evolve/entities.json" to match the implementation.In
@platform-integrations/roo/altk-evolve-lite/skills/altk-evolve-recall/scripts/get.py:
- Line 4: Docstring at the top of get.py references ".altk-evolve/entities.json"
but the runtime code reads from ".altk_evolve/entities.json"; update the module
docstring to mention ".altk_evolve/entities.json" so the path in the
documentation matches the actual string literal used in the code (search for the
".altk_evolve/entities.json" occurrence in get.py and change the docstring text
accordingly).
Nitpick comments:
In@altk_evolve/backend/postgres.py:
- Around line 231-234: The current ValueError raised when converting entity_id
with int(entity_id) is re-raised as ALTKEvolveException without preserving the
original traceback; catch the ValueError as a variable (e) and re-raise using
"raise ALTKEvolveException(f'Invalid entity ID: {entity_id}. Entity IDs must be
numeric.') from e" so the exception chain is preserved—update the try/except
around entity_id_int = int(entity_id) accordingly.In
@platform-integrations/claude/plugins/altk-evolve-lite/README.md:
- Around line 92-97: Update the fenced code block in README.md that shows the
directory listing to include a language specifier; change the triple-backtick
fence preceding ".altk-evolve/entities/" to use "text" (i.e., ```text) so the
directory structure snippet is rendered as plain text, leaving the contents
unchanged.In
@platform-integrations/INSTALL_SPEC.md:
- Around line 24-30: The two unlabeled Markdown code fences containing the
GitHub archive URLs (the lines with
"https://github.com/${ALTK_EVOLVE_REPO}/archive/refs/heads/main.tar.gz" and
"https://github.com/${ALTK_EVOLVE_REPO}/archive/refs/tags/v${VERSION}.tar.gz")
should be given a fence language (e.g., bash or text) to satisfy markdownlint;
update those fenced blocks to use a language tag likebash (ortext) and
make the same change for the other similar fenced block later in the file (the
one around the pinned version example).In
@tests/unit/test_mcp_server.py:
- Around line 17-98: Add the pytest unit marker to the four test functions
(test_save_trajectory_metadata_injection,
test_create_entity_metadata_injection_manual_guideline,
test_create_entity_metadata_injection_manual_policy,
test_create_entity_no_metadata_injection_for_other_types) by decorating each
with@pytest.mark.unit; also ensure pytest is imported at the top of the file if
it's not already (add "import pytest"). This will align these tests with the
project's unit-test marker convention.</details> <details> <summary>🪄 Autofix (Beta)</summary> Fix all unresolved CodeRabbit comments on this PR: - [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended) - [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: defaults **Review profile**: CHILL **Plan**: Pro **Run ID**: `1933a7ea-84e9-42b4-b9ac-a5fff8f9f6e9` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between bd67611088429d1b95d92731d08fec15aaee6383 and fd441e352a6ed99061ab2511c4f50d7988a420ef. </details> <details> <summary>⛔ Files ignored due to path filters (1)</summary> * `uv.lock` is excluded by `!**/*.lock` </details> <details> <summary>📒 Files selected for processing (133)</summary> * `.env.example` * `.github/workflows/docker-publish.yml` * `.github/workflows/python-publish.yml` * `.gitignore` * `.roomodes` * `AGENTS.md` * `ALTK_EVOLVE_LITE.md` * `CHANGELOG.md` * `CLAUDE_CODE_DEMO.md` * `CLI.md` * `CONFIGURATION.md` * `DOCKER_TESTING.md` * `Dockerfile.core` * `MANIFEST.in` * `README.md` * `README_phoenix_sync.md` * `SAVE_SKILL_DESIGN.md` * `altk_evolve/__init__.py` * `altk_evolve/auto/__init__.py` * `altk_evolve/backend/__init__.py` * `altk_evolve/backend/base.py` * `altk_evolve/backend/filesystem.py` * `altk_evolve/backend/milvus.py` * `altk_evolve/backend/postgres.py` * `altk_evolve/cli/__init__.py` * `altk_evolve/cli/cli.py` * `altk_evolve/config/__init__.py` * `altk_evolve/config/altk_evolve.py` * `altk_evolve/config/filesystem.py` * `altk_evolve/config/llm.py` * `altk_evolve/config/milvus.py` * `altk_evolve/config/phoenix.py` * `altk_evolve/config/postgres.py` * `altk_evolve/db/__init__.py` * `altk_evolve/db/sqlite_manager.py` * `altk_evolve/frontend/__init__.py` * `altk_evolve/frontend/client/__init__.py` * `altk_evolve/frontend/client/altk_evolve_client.py` * `altk_evolve/frontend/mcp/__init__.py` * `altk_evolve/frontend/mcp/__main__.py` * `altk_evolve/frontend/mcp/mcp_server.py` * `altk_evolve/llm/__init__.py` * `altk_evolve/llm/conflict_resolution/__init__.py` * `altk_evolve/llm/conflict_resolution/conflict_resolution.py` * `altk_evolve/llm/conflict_resolution/prompts/conflict_resolution.jinja2` * `altk_evolve/llm/conflict_resolution/prompts/default_conflict_resolution.jinja2` * `altk_evolve/llm/fact_extraction/__init__.py` * `altk_evolve/llm/fact_extraction/categorization.py` * `altk_evolve/llm/fact_extraction/fact_extraction.py` * `altk_evolve/llm/fact_extraction/prompts/fact_extraction.jinja2` * `altk_evolve/llm/fact_extraction/prompts/fact_extraction_predefined.jinja2` * `altk_evolve/llm/tips/__init__.py` * `altk_evolve/llm/tips/clustering.py` * `altk_evolve/llm/tips/prompts/combine_tips.jinja2` * `altk_evolve/llm/tips/prompts/generate_tips.jinja2` * `altk_evolve/llm/tips/tips.py` * `altk_evolve/schema/__init__.py` * `altk_evolve/schema/conflict_resolution.py` * `altk_evolve/schema/core.py` * `altk_evolve/schema/exceptions.py` * `altk_evolve/schema/policy.py` * `altk_evolve/schema/tips.py` * `altk_evolve/sync/__init__.py` * `altk_evolve/sync/phoenix_sync.py` * `altk_evolve/utils/__init__.py` * `altk_evolve/utils/utils.py` * `docs/LOW_CODE_TRACING.md` * `docs/POLICIES.md` * `docs/examples/hello_world/index.md` * `docs/index.md` * `docs/installation/index.md` * `docs/integrations/roo_code/Altk-Evolve-export.yaml` * `docs/integrations/roo_code/index.md` * `examples/low_code/litellm_demo.py` * `examples/low_code/manual_phoenix_demo.py` * `examples/low_code/openai_agents_demo.py` * `examples/low_code/simple_openai.py` * `examples/low_code/smolagents_demo.py` * `justfile` * `kaizen/cli/__init__.py` * `kaizen/llm/__init__.py` * `kaizen/schema/exceptions.py` * `kaizen/sync/__init__.py` * `mkdocs.yaml` * `platform-integrations/INSTALL_SPEC.md` * `platform-integrations/bob/altk-evolve-full/mcp.json` * `platform-integrations/bob/altk-evolve-lite/commands/altk-evolve:learn.md` * `platform-integrations/bob/altk-evolve-lite/commands/altk-evolve:recall.md` * `platform-integrations/bob/altk-evolve-lite/custom_modes.yaml` * `platform-integrations/bob/altk-evolve-lite/skills/altk-evolve-learn/SKILL.md` * `platform-integrations/bob/altk-evolve-lite/skills/altk-evolve-learn/scripts/save_entities.py` * `platform-integrations/bob/altk-evolve-lite/skills/altk-evolve-recall/SKILL.md` * `platform-integrations/bob/altk-evolve-lite/skills/altk-evolve-recall/scripts/retrieve_entities.py` * `platform-integrations/claude/marketplace.json` * `platform-integrations/claude/plugins/altk-evolve-lite/.claude-plugin/plugin.json` * `platform-integrations/claude/plugins/altk-evolve-lite/README.md` * `platform-integrations/claude/plugins/altk-evolve-lite/hooks/hooks.json` * `platform-integrations/claude/plugins/altk-evolve-lite/lib/__init__.py` * `platform-integrations/claude/plugins/altk-evolve-lite/lib/entity_io.py` * `platform-integrations/claude/plugins/altk-evolve-lite/skills/learn/SKILL.md` * `platform-integrations/claude/plugins/altk-evolve-lite/skills/learn/scripts/save_entities.py` * `platform-integrations/claude/plugins/altk-evolve-lite/skills/recall/SKILL.md` * `platform-integrations/claude/plugins/altk-evolve-lite/skills/recall/scripts/retrieve_entities.py` * `platform-integrations/claude/plugins/altk-evolve-lite/skills/save-trajectory/SKILL.md` * `platform-integrations/claude/plugins/altk-evolve-lite/skills/save-trajectory/scripts/save_trajectory.py` * `platform-integrations/claude/plugins/altk-evolve-lite/skills/save/SKILL.md` * `platform-integrations/install.sh` * `platform-integrations/roo/altk-evolve-lite/skills/.roomodes` * `platform-integrations/roo/altk-evolve-lite/skills/altk-evolve-learn/SKILL.md` * `platform-integrations/roo/altk-evolve-lite/skills/altk-evolve-learn/scripts/save.py` * `platform-integrations/roo/altk-evolve-lite/skills/altk-evolve-recall/SKILL.md` * `platform-integrations/roo/altk-evolve-lite/skills/altk-evolve-recall/scripts/get.py` * `pyproject.toml` * `sandbox/sample.env` * `tests/e2e/test_e2e_pipeline.py` * `tests/e2e/test_mcp.py` * `tests/llm/test_long_conflict_resolution.py` * `tests/platform_integrations/AGENTS.md` * `tests/platform_integrations/conftest.py` * `tests/platform_integrations/test_idempotency.py` * `tests/platform_integrations/test_preservation.py` * `tests/unit/test_cli.py` * `tests/unit/test_client.py` * `tests/unit/test_clustering.py` * `tests/unit/test_combine_tips.py` * `tests/unit/test_conflict_resolution.py` * `tests/unit/test_mcp_server.py` * `tests/unit/test_milvus_backend.py` * `tests/unit/test_phoenix_sync.py` * `tests/unit/test_policy_schema.py` * `tests/unit/test_postgres_backend.py` * `tests/unit/test_tips.py` * `tests/unit/test_tracing.py` </details> <details> <summary>💤 Files with no reviewable changes (4)</summary> * kaizen/cli/__init__.py * kaizen/schema/exceptions.py * kaizen/sync/__init__.py * kaizen/llm/__init__.py </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
|
|
||
| def __init__(self, db_path: str | None = None): | ||
| self.db_path = db_path or os.getenv("KAIZEN_SQLITE_PATH") or os.getenv("KAIZEN_SQLITE_URI") or "entities.sqlite.db" | ||
| self.db_path = db_path or os.getenv("ALTK_EVOLVE_SQLITE_PATH") or os.getenv("ALTK_EVOLVE_SQLITE_URI") or "entities.sqlite.db" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, let's examine the file structure and locate the sqlite_manager.py file
fd sqlite_manager.pyRepository: AgentToolkit/altk-evolve
Length of output: 100
🏁 Script executed:
# Read the file to see the actual implementation
cat -n altk_evolve/db/sqlite_manager.py | head -150Repository: AgentToolkit/altk-evolve
Length of output: 6501
🏁 Script executed:
# Search for usage of ALTK_EVOLVE_SQLITE_URI environment variable throughout the codebase
rg "ALTK_EVOLVE_SQLITE_URI" --type pyRepository: AgentToolkit/altk-evolve
Length of output: 234
🏁 Script executed:
# Search for any documentation or examples about this
rg "ALTK_EVOLVE_SQLITE" -A 2 -B 2 --type pyRepository: AgentToolkit/altk-evolve
Length of output: 1239
🏁 Script executed:
# Check if there are any tests related to SQLiteManager
fd -e test_*.py -e *_test.py | xargs grep -l "SQLiteManager" 2>/dev/nullRepository: AgentToolkit/altk-evolve
Length of output: 52
🌐 Web query:
SQLite3 Python uri parameter sqlite3.connect() when uri=True is not set
💡 Result:
When the uri parameter is not set (defaults to False) in sqlite3.connect, the database argument is treated as a standard filesystem path (string or path-like object), not as a URI. It is passed directly to SQLite's underlying open function without URI interpretation. If the path resembles a URI (e.g., starts with "file:"), it is still handled as a literal filename, which may create a file with that name on disk, depending on the OS and SQLite behavior. For example, sqlite3.connect('file:f1.db?mode=memory', uri=False) on Windows may create an empty file named 'file', while on Linux it creates a file named 'file:f1.db?mode=memory'. No URI query parameters (like ?mode=memory) are processed; they become part of the filename. To enable URI parsing (scheme "file:", query parameters for modes like ro, memory, etc.), explicitly set uri=True. Added in Python 3.4.
Citations:
- 1: https://docs.python.org/3/library/sqlite3.html
- 2: https://docs.python.org/3.15/library/sqlite3.html
- 3: https://sqlite.org/uri.html
- 4: https://docs.python.org/library/sqlite3.html
- 5: sqlite3 connect uri=False mode=memory python/cpython#136196
- 6: https://sqlite.org/c3ref/open.html
ALTK_EVOLVE_SQLITE_URI is read but not opened in URI mode.
Line 31 accepts a URI source, but connection setup (Line 142) calls sqlite3.connect(...) without uri=True, so URI-style connection strings are treated as literal file paths, not URIs. This prevents URI-style connections (like file:...?mode=memory) from working as intended.
Suggested fix
class SQLiteManager:
@@
def __init__(self, db_path: str | None = None):
- self.db_path = db_path or os.getenv("ALTK_EVOLVE_SQLITE_PATH") or os.getenv("ALTK_EVOLVE_SQLITE_URI") or "entities.sqlite.db"
+ sqlite_path = os.getenv("ALTK_EVOLVE_SQLITE_PATH")
+ sqlite_uri = os.getenv("ALTK_EVOLVE_SQLITE_URI")
+ self.db_path = db_path or sqlite_path or sqlite_uri or "entities.sqlite.db"
+ self._use_uri = (db_path is None and sqlite_path is None and sqlite_uri is not None) or self.db_path.startswith("file:")
@@
def __enter__(self) -> "SQLiteManager":
- self.connection = sqlite3.connect(self.db_path, check_same_thread=False)
+ self.connection = sqlite3.connect(self.db_path, check_same_thread=False, uri=self._use_uri)
self._lock = threading.Lock()
self._create_namespace_table()
return self🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@altk_evolve/db/sqlite_manager.py` at line 31, The code accepts URI-style DB
sources into self.db_path but opens the connection with sqlite3.connect(...)
without uri=True, so URI strings are treated as plain file paths; update the
connection logic (where sqlite3.connect is called) to detect URI-style paths
(e.g. self.db_path.startswith("file:") or when ALTK_EVOLVE_SQLITE_URI is used)
and pass uri=True to sqlite3.connect (e.g., sqlite3.connect(self.db_path,
uri=True, check_same_thread=False)); ensure detection is based on self.db_path
and keep existing options like check_same_thread=False.
| def test_get_all_entities(altk_evolve_client: ALTKEvolveClient, monkeypatch): | ||
| # Client should return a valid `RecordedEntity` list derived from API response | ||
| created_at = datetime.datetime.now(datetime.UTC) | ||
|
|
||
| def search_entities(self, namespace_id, query, filters, limit=10) -> list[RecordedEntity]: | ||
| return [RecordedEntity(id="1", type="fact", created_at=created_at, content="User's name is Foobar.")] | ||
|
|
||
| monkeypatch.setattr(kaizen_client.backend, "search_entities", search_entities.__get__(kaizen_client.backend, BaseEntityBackend)) | ||
| result = kaizen_client.search_entities(namespace_id="foobar", query="name") | ||
| monkeypatch.setattr( | ||
| altk_evolve_client.backend, "search_entities", search_entities.__get__(altk_evolve_client.backend, BaseEntityBackend) | ||
| ) | ||
| result = altk_evolve_client.search_entities(namespace_id="foobar", query="name") | ||
| assert result[0].id == "1" |
There was a problem hiding this comment.
test_get_all_entities is calling the wrong client method.
Line 169 calls search_entities, so this test does not validate the get_all_entities wrapper behavior.
Proposed fix
- result = altk_evolve_client.search_entities(namespace_id="foobar", query="name")
+ result = altk_evolve_client.get_all_entities(namespace_id="foobar")🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@tests/unit/test_client.py` around lines 159 - 170, The test currently calls
altk_evolve_client.search_entities but is intended to validate the
get_all_entities wrapper; change the invocation to call
altk_evolve_client.get_all_entities(namespace_id="foobar", query="name") while
keeping the monkeypatched backend.search_entities implementation
(search_entities on BaseEntityBackend) so the wrapper delegates to it; assert
the returned list from get_all_entities (result[0].id == "1") to verify the
wrapper behavior.
|
Should we call the CLI, plugins, skills The pip package can be |
There was a problem hiding this comment.
Actionable comments posted: 8
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
platform-integrations/claude/plugins/evolve-lite/README.md (1)
72-77:⚠️ Potential issue | 🟡 MinorAdd language identifiers to fenced code blocks (markdownlint MD040).
Two fenced blocks are missing a language tag.
📝 Suggested markdown fix
-``` +```text User: [Complete a successful task] User: "save" Assistant: "What would you like to name this skill?" User: "my-workflow-name"@@
-+text
.evolve/entities/
guideline/
use-python-pil-for-image-metadata-extraction.md
cache-api-responses-locally.mdAlso applies to: 92-97
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@platform-integrations/claude/plugins/evolve-lite/README.md` around lines 72 - 77, Add explicit language identifiers to the two fenced code blocks that are missing them: the block containing the conversation starting with "User: [Complete a successful task]" (replace ``` with ```text) and the block listing the directory entries beginning with ".evolve/entities/" (replace ``` with ```text); update both fenced code block openings so markdownlint MD040 is satisfied.evolve/backend/postgres.py (1)
230-243:⚠️ Potential issue | 🟠 Major
delete_entity_by_idshould raise when no row is deleted.Right now, deleting a non-existent ID is treated as success. That makes Postgres behavior inconsistent with filesystem and can produce incorrect success responses upstream.
💡 Proposed fix
with self.conn.cursor() as cur: cur.execute( - sql.SQL("DELETE FROM {table} WHERE id = %s").format(table=sql.Identifier(table)), + sql.SQL("DELETE FROM {table} WHERE id = %s RETURNING id").format(table=sql.Identifier(table)), (entity_id_int,), ) + deleted = cur.fetchone() + if deleted is None: + raise EvolveException(f"Entity `{entity_id}` not found")🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@evolve/backend/postgres.py` around lines 230 - 243, The delete_entity_by_id implementation currently treats deleting a non-existent ID as success; update delete_entity_by_id to check the cursor's affected row count after executing the DELETE (use cur.rowcount) and if it is 0 raise an EvolveException (e.g., "Entity not found" including namespace_id and entity_id) so callers get an error when no row was deleted; make this check immediately after cur.execute in delete_entity_by_id.evolve/backend/milvus.py (1)
348-355:⚠️ Potential issue | 🟠 Major
delete_entity_by_idshould fail when the entity does not exist.This currently succeeds silently for missing IDs, which is inconsistent with
evolve/backend/filesystem.pyand can lead callers to report false success.💡 Proposed contract-consistent behavior
def delete_entity_by_id(self, namespace_id: str, entity_id: str): try: entity_id_int = int(entity_id) except ValueError as exc: raise EvolveException(f"Invalid entity ID: {entity_id}. Entity IDs must be numeric.") from exc self._validate_namespace(namespace_id) + existing = self.search_entities(namespace_id=namespace_id, query=None, filters={"id": entity_id_int}, limit=1) + if not existing: + raise EvolveException(f"Entity `{entity_id}` not found") self.milvus.delete(collection_name=namespace_id, ids=[entity_id_int])🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@evolve/backend/milvus.py` around lines 348 - 355, delete_entity_by_id currently returns success even when the requested entity doesn't exist; update delete_entity_by_id so it fails consistently with filesystem behavior by verifying the entity exists before or after deletion and raising EvolveException if it was not found. Use the existing helpers to locate the entity (e.g., call a read/query method on self.milvus or a get-by-id helper) or inspect the deletion response from self.milvus.delete(collection_name=namespace_id, ids=[entity_id_int]); if the entity isn't present, raise EvolveException with a clear message. Keep the existing namespace check (_validate_namespace) and numeric ID parsing (entity_id_int) but add this existence check (and use the same exception type) to ensure consistent contract.platform-integrations/bob/evolve-full/mcp.json (1)
1-12:⚠️ Potential issue | 🔴 CriticalDocker image must be published before deployment.
The MCP configuration syntax is correct and properly renamed from kaizen to evolve. However, the Docker image
1lleatmyhat/evolve:latest-coredoes not exist on Docker Hub. This must be resolved before deploying this change, as the MCP server will fail to start without the image.Ensure the image is published to the registry with the correct tag, or update the configuration to reference an existing image.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@platform-integrations/bob/evolve-full/mcp.json` around lines 1 - 12, The mcpServers.evolve entry references a non-existent Docker image "1lleatmyhat/evolve:latest-core"; either publish that image to the registry with the exact tag or update the mcpServers.evolve args to reference a valid existing image. Locate the mcpServers.evolve object in the JSON (check the "command" and "args" array) and replace the image string "1lleatmyhat/evolve:latest-core" with the published image tag, or publish the missing image under that name/tag before deploying so the MCP server can pull it.
🧹 Nitpick comments (7)
docs/index.md (1)
14-14: Use descriptive image alt text for docs accessibility/readability.Line 14 currently uses
Screenshot, which is generic and less useful in rendered docs/search previews.Suggested improvement
- +🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/index.md` at line 14, Replace the generic alt text "Screenshot" for the Markdown image referencing assets/architecture.png with a concise, descriptive phrase that communicates the image content for accessibility and search previews (e.g., "System architecture diagram showing services, data flow, and integrations"); update the alt string in the image tag so readers and assistive tech get meaningful context about assets/architecture.png.platform-integrations/claude/plugins/evolve-lite/lib/entity_io.py (1)
41-41: Add a temporary fallback for legacyKAIZEN_*env vars to reduce upgrade friction.Current behavior will silently ignore existing
KAIZEN_DEBUG/KAIZEN_ENTITIES_DIRsetups after upgrade. A short compatibility window would make migration safer.♻️ Suggested compatibility shim
- if not os.environ.get("EVOLVE_DEBUG"): + if not (os.environ.get("EVOLVE_DEBUG") or os.environ.get("KAIZEN_DEBUG")): return @@ - env_dir = os.environ.get("EVOLVE_ENTITIES_DIR") + env_dir = os.environ.get("EVOLVE_ENTITIES_DIR") or os.environ.get("KAIZEN_ENTITIES_DIR") @@ - env_dir = os.environ.get("EVOLVE_ENTITIES_DIR") + env_dir = os.environ.get("EVOLVE_ENTITIES_DIR") or os.environ.get("KAIZEN_ENTITIES_DIR")Also applies to: 67-67, 91-91
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@platform-integrations/claude/plugins/evolve-lite/lib/entity_io.py` at line 41, The code currently checks EVOLVE_* env vars (e.g. the conditional using EVOLVE_DEBUG) and will ignore legacy KAIZEN_* settings; update the env lookups in entity_io.py (the checks around EVOLVE_DEBUG, EVOLVE_ENTITIES_DIR, and the two other EVOLVE_* checks at the other sites) to fall back to the legacy KAIZEN_* names when the EVOLVE_* values are not set (e.g., resolve debug_enabled = os.environ.get("EVOLVE_DEBUG") or os.environ.get("KAIZEN_DEBUG") and similarly for entities_dir using EVOLVE_ENTITIES_DIR or KAIZEN_ENTITIES_DIR) so all three checks (lines shown) use the compatibility shim.platform-integrations/bob/evolve-lite/skills/evolve-recall/SKILL.md (1)
24-24: Add language specifier to fenced code block.The fenced code block on line 24 should specify a language identifier for better rendering and to satisfy markdown linting rules. For directory tree structures, consider using
textor leave it blank if the renderer supports it.📝 Suggested fix
-``` +```text .evolve/entities/As per coding guidelines, markdownlint-cli2 rule MD040 requires fenced code blocks to have a language specified.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@platform-integrations/bob/evolve-lite/skills/evolve-recall/SKILL.md` at line 24, The fenced code block containing the directory listing entry ".evolve/entities/" in SKILL.md is missing a language specifier (MD040); update that code fence to include a language identifier such as "text" (e.g., change the opening ``` to ```text) so the block renders correctly and satisfies markdown linting; locate the block around the ".evolve/entities/" line in SKILL.md and add the language tag to the opening fence.examples/low_code/smolagents_demo.py (1)
3-5: Avoid import-time side effects in the demo module.Lines 3-5 execute on import and can generate noisy output outside direct script execution. Move this check into
main().♻️ Proposed refactor
-# Ensure EVOLVE_AUTO_ENABLED is set -if os.environ.get("EVOLVE_AUTO_ENABLED", "").lower() != "true": - print("WARNING: EVOLVE_AUTO_ENABLED is not true") - import evolve.auto # noqa: F401 from evolve.config.llm import llm_settings @@ def main(): + # Ensure EVOLVE_AUTO_ENABLED is set + if os.environ.get("EVOLVE_AUTO_ENABLED", "").lower() != "true": + print("WARNING: EVOLVE_AUTO_ENABLED is not true") + # Use LiteLLMModel to support generic providers # Exact match of Evolve's internal usage pattern: model_id = os.environ.get("EVOLVE_EXAMPLE_AGENT_MODEL") or llm_settings.tips_model🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/low_code/smolagents_demo.py` around lines 3 - 5, The module currently performs an import-time side-effect by checking EVOLVE_AUTO_ENABLED and printing a warning; move that check inside the script entrypoint so importing the module is side-effect free: remove the top-level conditional and add the same check into the main() function (or the function that serves as the entrypoint in smolagents_demo.py), using os.environ.get("EVOLVE_AUTO_ENABLED", "").lower() != "true" to decide whether to print the warning so the behavior only occurs when main() is executed.evolve/config/evolve.py (1)
6-8: Consider a short-lived migration bridge for legacyKAIZEN_*env vars.Line 6 switches to
EVOLVE_only, so existing deployments withKAIZEN_BACKEND/KAIZEN_NAMESPACE_IDmay silently fall back to defaults. A temporary compatibility path (or explicit migration warning) would make rollout safer.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@evolve/config/evolve.py` around lines 6 - 8, The new SettingsConfigDict uses EVOLVE_ env vars but we should add a short-lived migration bridge that detects legacy KAIZEN_ vars and maps them into the new settings to avoid silent fallback: in evolve.py, before creating model_config or reading backend/namespace_id, check os.environ for KAIZEN_BACKEND and KAIZEN_NAMESPACE_ID (or other KAIZEN_* keys), set corresponding EVOLVE_BACKEND/EVOLVE_NAMESPACE_ID or assign their values directly to the backend and namespace_id defaults, and emit a visible warning via the module logger indicating the legacy vars were used and advising users to switch to EVOLVE_*; ensure this logic references model_config, backend, namespace_id and SettingsConfigDict so it's clear and removable after migration.evolve/frontend/client/evolve_client.py (1)
15-20: Consider a temporary backward-compat alias for the renamed client class.
EvolveClientis the right long-term name, but adding a short-lived alias can reduce downstream breakage for current SDK users.💡 Transitional compatibility alias
class EvolveClient: """Wrapper client around evolve entity backends.""" @@ else: raise NotImplementedError(f"Entity backend not implemented: {self.config.backend}") + +# Backward compatibility (remove in next major release) +KaizenClient = EvolveClient🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@evolve/frontend/client/evolve_client.py` around lines 15 - 20, Add a short-lived backward-compatibility alias for the renamed class to reduce downstream breakage by assigning the old name to the new class (e.g., set the previous class name to EvolveClient) and mark it as deprecated in a comment or docstring; update or add a brief deprecation note near the EvolveClient class definition so users see the migration path and the alias can be removed in a future release.evolve/sync/phoenix_sync.py (1)
24-25: Consider removinglogging.basicConfigfrom library code.Calling
logging.basicConfig()at module import time can override the application's logging configuration. Library modules should typically only get a logger without configuring handlers.♻️ Suggested change
-logging.basicConfig(level=logging.INFO) logger = logging.getLogger("evolve.sync.phoenix")This is a pre-existing pattern and not introduced by this rename, so it can be addressed separately if desired.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@evolve/sync/phoenix_sync.py` around lines 24 - 25, Remove the call to logging.basicConfig() from module import time so the library does not override application logging; keep the module-level logger instantiation (logger = logging.getLogger("evolve.sync.phoenix")) and let the application configure handlers/levels elsewhere (i.e., delete or comment out the logging.basicConfig(...) line).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.env.example:
- Line 14: The file ends without a terminal newline causing a dotenv-linter
EndingBlankLine warning; open the .env.example file and add a single trailing
newline (i.e., ensure the file ends with a blank line after the last line "#
EVOLVE_CLUSTERING_THRESHOLD=0.80") so the file terminates with a newline
character.
In @.roomodes:
- Around line 1-29: The "evolve" custom mode (slug: "evolve") has its
customInstructions pointing to a non-existent file
".roo/rules-evolve/instructions.md"; fix this by either creating the referenced
instructions file at .roo/rules-evolve/instructions.md with the required
content, or update the "customInstructions" value in the "evolve" entry to point
to an existing instructions file/path, or remove the reference entirely if no
external file is needed; ensure you edit the "customInstructions" field in the
"evolve" object so the path is valid or the instruction text is self-contained.
In `@docs/index.md`:
- Line 2: Replace the mixed emphasis "***_Self-improving agents through
iterations._***" with a consistent markdown emphasis style (e.g., use either
italic "_Self-improving agents through iterations._" or bold+italic
"***Self-improving agents through iterations.***") so the line complies with
MD049; update the line content accordingly.
In `@evolve/backend/milvus.py`:
- Line 31: self.sqlite_uri currently only checks EVOLVE_SQLITE_PATH which breaks
existing deployments using KAIZEN_SQLITE_PATH; update the assignment in the
class initializer where self.sqlite_uri is set to first check
os.getenv("EVOLVE_SQLITE_PATH"), then fall back to
os.getenv("KAIZEN_SQLITE_PATH"), and finally to self.config.sqlite_uri so both
env var names are supported (optionally log or emit a deprecation notice if
KAIZEN_SQLITE_PATH is used).
In `@platform-integrations/claude/plugins/evolve-lite/README.md`:
- Around line 116-118: Add documentation for the EVOLVE_DEBUG environment
variable to the README entry alongside EVOLVE_ENTITIES_DIR and
CLAUDE_PROJECT_ROOT: explain that EVOLVE_DEBUG enables verbose debug logging for
the plugin scripts, indicate accepted truthy values (e.g., "1", "true", or
non-empty) and how to enable/disable it, and include a short example of enabling
it when running the plugin so users can reproduce debug output; update the ENV
vars list in the README.md to include this new EVOLVE_DEBUG description.
In `@platform-integrations/INSTALL_SPEC.md`:
- Around line 24-30: The markdown fenced code blocks in INSTALL_SPEC.md lack
language identifiers (triggering MD040); update the three affected fences (the
two tar.gz URLs and the example command) to include appropriate languages by
changing the URL blocks to use "text" (for the two lines with
https://github.com/${EVOLVE_REPO}/...) and the command block around "claude
--plugin-dir /path/to/platform-integrations/claude/plugins/evolve-lite" to use
"bash" so the file conforms to markdownlint.
- Around line 32-33: Update the default repository slug and any hard-coded URLs
from AgentToolkit/evolve to AgentToolkit/altk-evolve: change the EVOLVE_REPO
default value and replace every occurrence of "AgentToolkit/evolve" in the
INSTALL_SPEC.md content (including command examples and spec values mentioned
alongside EVOLVE_REPO and EVOLVE_VERSION) so they point to
"AgentToolkit/altk-evolve"; ensure EVOLVE_REPO, EVOLVE_VERSION references and
any example commands/paths are consistent with the new repo slug.
- Around line 168-176: Update the documented sentinel format in INSTALL_SPEC.md
to match the installer implementation: replace occurrences of the sentinel '#
>>>evolve-lite<<<' / '# <<<evolve-lite<<<' with the installer’s actual pattern
'# >>>evolve:{slug}<<<' / '# <<<evolve:{slug}<<<' (e.g., '#
>>>evolve:evolve-lite<<<'), and adjust the description that checks for and
replaces the block between sentinels accordingly so it mirrors the logic in
platform-integrations/install.sh.
---
Outside diff comments:
In `@evolve/backend/milvus.py`:
- Around line 348-355: delete_entity_by_id currently returns success even when
the requested entity doesn't exist; update delete_entity_by_id so it fails
consistently with filesystem behavior by verifying the entity exists before or
after deletion and raising EvolveException if it was not found. Use the existing
helpers to locate the entity (e.g., call a read/query method on self.milvus or a
get-by-id helper) or inspect the deletion response from
self.milvus.delete(collection_name=namespace_id, ids=[entity_id_int]); if the
entity isn't present, raise EvolveException with a clear message. Keep the
existing namespace check (_validate_namespace) and numeric ID parsing
(entity_id_int) but add this existence check (and use the same exception type)
to ensure consistent contract.
In `@evolve/backend/postgres.py`:
- Around line 230-243: The delete_entity_by_id implementation currently treats
deleting a non-existent ID as success; update delete_entity_by_id to check the
cursor's affected row count after executing the DELETE (use cur.rowcount) and if
it is 0 raise an EvolveException (e.g., "Entity not found" including
namespace_id and entity_id) so callers get an error when no row was deleted;
make this check immediately after cur.execute in delete_entity_by_id.
In `@platform-integrations/bob/evolve-full/mcp.json`:
- Around line 1-12: The mcpServers.evolve entry references a non-existent Docker
image "1lleatmyhat/evolve:latest-core"; either publish that image to the
registry with the exact tag or update the mcpServers.evolve args to reference a
valid existing image. Locate the mcpServers.evolve object in the JSON (check the
"command" and "args" array) and replace the image string
"1lleatmyhat/evolve:latest-core" with the published image tag, or publish the
missing image under that name/tag before deploying so the MCP server can pull
it.
In `@platform-integrations/claude/plugins/evolve-lite/README.md`:
- Around line 72-77: Add explicit language identifiers to the two fenced code
blocks that are missing them: the block containing the conversation starting
with "User: [Complete a successful task]" (replace ``` with ```text) and the
block listing the directory entries beginning with ".evolve/entities/" (replace
``` with ```text); update both fenced code block openings so markdownlint MD040
is satisfied.
---
Nitpick comments:
In `@docs/index.md`:
- Line 14: Replace the generic alt text "Screenshot" for the Markdown image
referencing assets/architecture.png with a concise, descriptive phrase that
communicates the image content for accessibility and search previews (e.g.,
"System architecture diagram showing services, data flow, and integrations");
update the alt string in the image tag so readers and assistive tech get
meaningful context about assets/architecture.png.
In `@evolve/config/evolve.py`:
- Around line 6-8: The new SettingsConfigDict uses EVOLVE_ env vars but we
should add a short-lived migration bridge that detects legacy KAIZEN_ vars and
maps them into the new settings to avoid silent fallback: in evolve.py, before
creating model_config or reading backend/namespace_id, check os.environ for
KAIZEN_BACKEND and KAIZEN_NAMESPACE_ID (or other KAIZEN_* keys), set
corresponding EVOLVE_BACKEND/EVOLVE_NAMESPACE_ID or assign their values directly
to the backend and namespace_id defaults, and emit a visible warning via the
module logger indicating the legacy vars were used and advising users to switch
to EVOLVE_*; ensure this logic references model_config, backend, namespace_id
and SettingsConfigDict so it's clear and removable after migration.
In `@evolve/frontend/client/evolve_client.py`:
- Around line 15-20: Add a short-lived backward-compatibility alias for the
renamed class to reduce downstream breakage by assigning the old name to the new
class (e.g., set the previous class name to EvolveClient) and mark it as
deprecated in a comment or docstring; update or add a brief deprecation note
near the EvolveClient class definition so users see the migration path and the
alias can be removed in a future release.
In `@evolve/sync/phoenix_sync.py`:
- Around line 24-25: Remove the call to logging.basicConfig() from module import
time so the library does not override application logging; keep the module-level
logger instantiation (logger = logging.getLogger("evolve.sync.phoenix")) and let
the application configure handlers/levels elsewhere (i.e., delete or comment out
the logging.basicConfig(...) line).
In `@examples/low_code/smolagents_demo.py`:
- Around line 3-5: The module currently performs an import-time side-effect by
checking EVOLVE_AUTO_ENABLED and printing a warning; move that check inside the
script entrypoint so importing the module is side-effect free: remove the
top-level conditional and add the same check into the main() function (or the
function that serves as the entrypoint in smolagents_demo.py), using
os.environ.get("EVOLVE_AUTO_ENABLED", "").lower() != "true" to decide whether to
print the warning so the behavior only occurs when main() is executed.
In `@platform-integrations/bob/evolve-lite/skills/evolve-recall/SKILL.md`:
- Line 24: The fenced code block containing the directory listing entry
".evolve/entities/" in SKILL.md is missing a language specifier (MD040); update
that code fence to include a language identifier such as "text" (e.g., change
the opening ``` to ```text) so the block renders correctly and satisfies
markdown linting; locate the block around the ".evolve/entities/" line in
SKILL.md and add the language tag to the opening fence.
In `@platform-integrations/claude/plugins/evolve-lite/lib/entity_io.py`:
- Line 41: The code currently checks EVOLVE_* env vars (e.g. the conditional
using EVOLVE_DEBUG) and will ignore legacy KAIZEN_* settings; update the env
lookups in entity_io.py (the checks around EVOLVE_DEBUG, EVOLVE_ENTITIES_DIR,
and the two other EVOLVE_* checks at the other sites) to fall back to the legacy
KAIZEN_* names when the EVOLVE_* values are not set (e.g., resolve debug_enabled
= os.environ.get("EVOLVE_DEBUG") or os.environ.get("KAIZEN_DEBUG") and similarly
for entities_dir using EVOLVE_ENTITIES_DIR or KAIZEN_ENTITIES_DIR) so all three
checks (lines shown) use the compatibility shim.
🪄 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: 92043c14-57a5-417f-b66f-a05b6365d766
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (129)
.env.example.github/workflows/docker-publish.yml.github/workflows/python-publish.yml.gitignore.roomodesAGENTS.mdCHANGELOG.mdCLAUDE_CODE_DEMO.mdCLI.mdCONFIGURATION.mdDOCKER_TESTING.mdDockerfile.coreEVOLVE_LITE.mdMANIFEST.inREADME.mdREADME_phoenix_sync.mdSAVE_SKILL_DESIGN.mddocs/LOW_CODE_TRACING.mddocs/POLICIES.mddocs/examples/hello_world/index.mddocs/index.mddocs/installation/index.mddocs/integrations/roo_code/Evolve-export.yamldocs/integrations/roo_code/index.mdevolve/__init__.pyevolve/auto/__init__.pyevolve/backend/__init__.pyevolve/backend/base.pyevolve/backend/filesystem.pyevolve/backend/milvus.pyevolve/backend/postgres.pyevolve/cli/__init__.pyevolve/cli/cli.pyevolve/config/__init__.pyevolve/config/evolve.pyevolve/config/filesystem.pyevolve/config/llm.pyevolve/config/milvus.pyevolve/config/phoenix.pyevolve/config/postgres.pyevolve/db/__init__.pyevolve/db/sqlite_manager.pyevolve/frontend/__init__.pyevolve/frontend/client/__init__.pyevolve/frontend/client/evolve_client.pyevolve/frontend/mcp/__init__.pyevolve/frontend/mcp/__main__.pyevolve/frontend/mcp/mcp_server.pyevolve/llm/__init__.pyevolve/llm/conflict_resolution/__init__.pyevolve/llm/conflict_resolution/conflict_resolution.pyevolve/llm/conflict_resolution/prompts/conflict_resolution.jinja2evolve/llm/conflict_resolution/prompts/default_conflict_resolution.jinja2evolve/llm/fact_extraction/__init__.pyevolve/llm/fact_extraction/categorization.pyevolve/llm/fact_extraction/fact_extraction.pyevolve/llm/fact_extraction/prompts/fact_extraction.jinja2evolve/llm/fact_extraction/prompts/fact_extraction_predefined.jinja2evolve/llm/tips/__init__.pyevolve/llm/tips/clustering.pyevolve/llm/tips/prompts/combine_tips.jinja2evolve/llm/tips/prompts/generate_tips.jinja2evolve/llm/tips/tips.pyevolve/schema/__init__.pyevolve/schema/conflict_resolution.pyevolve/schema/core.pyevolve/schema/exceptions.pyevolve/schema/policy.pyevolve/schema/tips.pyevolve/sync/__init__.pyevolve/sync/phoenix_sync.pyevolve/utils/__init__.pyevolve/utils/utils.pyexamples/low_code/litellm_demo.pyexamples/low_code/manual_phoenix_demo.pyexamples/low_code/openai_agents_demo.pyexamples/low_code/simple_openai.pyexamples/low_code/smolagents_demo.pyjustfilemkdocs.yamlplatform-integrations/INSTALL_SPEC.mdplatform-integrations/bob/evolve-full/mcp.jsonplatform-integrations/bob/evolve-lite/commands/evolve:learn.mdplatform-integrations/bob/evolve-lite/commands/evolve:recall.mdplatform-integrations/bob/evolve-lite/custom_modes.yamlplatform-integrations/bob/evolve-lite/skills/evolve-learn/SKILL.mdplatform-integrations/bob/evolve-lite/skills/evolve-learn/scripts/save_entities.pyplatform-integrations/bob/evolve-lite/skills/evolve-recall/SKILL.mdplatform-integrations/bob/evolve-lite/skills/evolve-recall/scripts/retrieve_entities.pyplatform-integrations/claude/marketplace.jsonplatform-integrations/claude/plugins/evolve-lite/.claude-plugin/plugin.jsonplatform-integrations/claude/plugins/evolve-lite/README.mdplatform-integrations/claude/plugins/evolve-lite/hooks/hooks.jsonplatform-integrations/claude/plugins/evolve-lite/lib/__init__.pyplatform-integrations/claude/plugins/evolve-lite/lib/entity_io.pyplatform-integrations/claude/plugins/evolve-lite/skills/learn/SKILL.mdplatform-integrations/claude/plugins/evolve-lite/skills/learn/scripts/save_entities.pyplatform-integrations/claude/plugins/evolve-lite/skills/recall/SKILL.mdplatform-integrations/claude/plugins/evolve-lite/skills/recall/scripts/retrieve_entities.pyplatform-integrations/claude/plugins/evolve-lite/skills/save-trajectory/SKILL.mdplatform-integrations/claude/plugins/evolve-lite/skills/save-trajectory/scripts/save_trajectory.pyplatform-integrations/claude/plugins/evolve-lite/skills/save/SKILL.mdplatform-integrations/install.shplatform-integrations/roo/evolve-lite/skills/.roomodesplatform-integrations/roo/evolve-lite/skills/evolve-learn/SKILL.mdplatform-integrations/roo/evolve-lite/skills/evolve-learn/scripts/save.pyplatform-integrations/roo/evolve-lite/skills/evolve-recall/SKILL.mdplatform-integrations/roo/evolve-lite/skills/evolve-recall/scripts/get.pypyproject.tomlsandbox/sample.envtests/e2e/test_e2e_pipeline.pytests/e2e/test_mcp.pytests/llm/test_long_conflict_resolution.pytests/platform_integrations/AGENTS.mdtests/platform_integrations/conftest.pytests/platform_integrations/test_idempotency.pytests/platform_integrations/test_preservation.pytests/unit/test_cli.pytests/unit/test_client.pytests/unit/test_clustering.pytests/unit/test_combine_tips.pytests/unit/test_conflict_resolution.pytests/unit/test_mcp_server.pytests/unit/test_milvus_backend.pytests/unit/test_phoenix_sync.pytests/unit/test_policy_schema.pytests/unit/test_postgres_backend.pytests/unit/test_tips.pytests/unit/test_tracing.py
✅ Files skipped from review due to trivial changes (45)
- .gitignore
- .github/workflows/python-publish.yml
- CLAUDE_CODE_DEMO.md
- evolve/cli/init.py
- evolve/llm/fact_extraction/categorization.py
- evolve/llm/fact_extraction/fact_extraction.py
- platform-integrations/bob/evolve-lite/skills/evolve-recall/scripts/retrieve_entities.py
- evolve/schema/conflict_resolution.py
- platform-integrations/claude/plugins/evolve-lite/skills/recall/SKILL.md
- platform-integrations/bob/evolve-lite/skills/evolve-learn/SKILL.md
- MANIFEST.in
- evolve/llm/init.py
- platform-integrations/roo/evolve-lite/skills/evolve-learn/scripts/save.py
- platform-integrations/bob/evolve-lite/skills/evolve-learn/scripts/save_entities.py
- docs/POLICIES.md
- platform-integrations/roo/evolve-lite/skills/evolve-recall/scripts/get.py
- platform-integrations/bob/evolve-lite/commands/evolve:learn.md
- platform-integrations/bob/evolve-lite/commands/evolve:recall.md
- platform-integrations/roo/evolve-lite/skills/evolve-recall/SKILL.md
- tests/unit/test_policy_schema.py
- platform-integrations/roo/evolve-lite/skills/evolve-learn/SKILL.md
- evolve/config/milvus.py
- evolve/config/filesystem.py
- CLI.md
- platform-integrations/claude/plugins/evolve-lite/.claude-plugin/plugin.json
- platform-integrations/claude/plugins/evolve-lite/skills/save-trajectory/SKILL.md
- platform-integrations/claude/plugins/evolve-lite/skills/learn/SKILL.md
- .github/workflows/docker-publish.yml
- docs/integrations/roo_code/Evolve-export.yaml
- evolve/schema/exceptions.py
- DOCKER_TESTING.md
- docs/integrations/roo_code/index.md
- tests/unit/test_conflict_resolution.py
- tests/unit/test_tips.py
- examples/low_code/manual_phoenix_demo.py
- docs/installation/index.md
- tests/unit/test_mcp_server.py
- tests/unit/test_postgres_backend.py
- mkdocs.yaml
- EVOLVE_LITE.md
- platform-integrations/claude/marketplace.json
- docs/examples/hello_world/index.md
- tests/unit/test_tracing.py
- SAVE_SKILL_DESIGN.md
- AGENTS.md
🚧 Files skipped from review as they are similar to previous changes (20)
- sandbox/sample.env
- tests/unit/test_clustering.py
- Dockerfile.core
- examples/low_code/simple_openai.py
- examples/low_code/openai_agents_demo.py
- tests/e2e/test_e2e_pipeline.py
- tests/unit/test_milvus_backend.py
- README.md
- examples/low_code/litellm_demo.py
- tests/unit/test_phoenix_sync.py
- tests/unit/test_combine_tips.py
- tests/e2e/test_mcp.py
- pyproject.toml
- tests/platform_integrations/test_idempotency.py
- docs/LOW_CODE_TRACING.md
- CHANGELOG.md
- justfile
- platform-integrations/install.sh
- tests/platform_integrations/conftest.py
- tests/platform_integrations/AGENTS.md
| @@ -0,0 +1,14 @@ | |||
| # Evolve | |||
| ***_Self-improving agents through iterations._*** | |||
There was a problem hiding this comment.
Fix markdown emphasis style to satisfy MD049.
Line 2 mixes *** with _..._, which triggers the configured emphasis-style lint rule.
Proposed fix
-***_Self-improving agents through iterations._***
+***Self-improving agents through iterations.***📝 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.
| ***_Self-improving agents through iterations._*** | |
| ***Self-improving agents through iterations.*** |
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 2-2: Emphasis style
Expected: asterisk; Actual: underscore
(MD049, emphasis-style)
[warning] 2-2: Emphasis style
Expected: asterisk; Actual: underscore
(MD049, emphasis-style)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/index.md` at line 2, Replace the mixed emphasis "***_Self-improving
agents through iterations._***" with a consistent markdown emphasis style (e.g.,
use either italic "_Self-improving agents through iterations._" or bold+italic
"***Self-improving agents through iterations.***") so the line complies with
MD049; update the line content accordingly.
| - `EVOLVE_ENTITIES_DIR`: Override the default entities directory location | ||
| - `CLAUDE_PROJECT_ROOT`: Set by Claude Code, used to locate project-level entities | ||
|
|
There was a problem hiding this comment.
Document EVOLVE_DEBUG in Environment Variables.
EVOLVE_DEBUG is now used by the plugin scripts for debug logging, but it isn’t listed here.
📝 Suggested docs addition
- `EVOLVE_ENTITIES_DIR`: Override the default entities directory location
+- `EVOLVE_DEBUG`: Enable debug logging for Evolve plugin scripts
- `CLAUDE_PROJECT_ROOT`: Set by Claude Code, used to locate project-level entities🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@platform-integrations/claude/plugins/evolve-lite/README.md` around lines 116
- 118, Add documentation for the EVOLVE_DEBUG environment variable to the README
entry alongside EVOLVE_ENTITIES_DIR and CLAUDE_PROJECT_ROOT: explain that
EVOLVE_DEBUG enables verbose debug logging for the plugin scripts, indicate
accepted truthy values (e.g., "1", "true", or non-empty) and how to
enable/disable it, and include a short example of enabling it when running the
plugin so users can reproduce debug output; update the ENV vars list in the
README.md to include this new EVOLVE_DEBUG description.
We need to change the name to be more prosaic and in line with "what" Kaizen was supposed to do
Summary by CodeRabbit
New Features
Documentation
KAIZEN_*toEVOLVE_*prefixkaizentoevolveChores