Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions platform-integrations/claude/plugins/evolve-lite/lib/entity_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,6 @@ def get_default_entities_dir():
return base.resolve()


def get_trajectories_dir():
"""Return (and create) the trajectories directory as an absolute Path.

Uses :func:`get_evolve_dir` for the base so trajectories land alongside
entities under the same ``EVOLVE_DIR`` / ``.evolve`` root.
"""
base = get_evolve_dir() / "trajectories"
base.mkdir(parents=True, exist_ok=True, mode=0o700)
return base.resolve()


# ---------------------------------------------------------------------------
# Slugify / filename helpers
# ---------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This skill analyzes the current conversation to extract guidelines that **correc

This skill runs in a forked context with no access to the parent conversation. The stop-hook message (produced by `on_stop.py`) contains one literal marker:

- `The saved trajectory path is: <path>` — a copy of the session transcript written by the save-trajectory Stop hook. The path is absolute and resolves under `$EVOLVE_DIR/trajectories/` (or the project's `.evolve/trajectories/` when `EVOLVE_DIR` is unset), with filename `claude-transcript_<session-id>.jsonl`. Take everything after the colon, strip surrounding whitespace and quotes, and use the result as `saved_trajectory_path`. You will also attach this exact path to each entity's `trajectory` field in Step 4.
- `The saved trajectory path is: <path>` — a copy of the session transcript saved inside the project tree at `.evolve/trajectories/claude-transcript_<session-id>.jsonl`. Take everything after the colon, strip surrounding whitespace and quotes, and use the result as `saved_trajectory_path`. You will also attach this exact path to each entity's `trajectory` field in Step 4.

**Read this file with the `Read` tool — do NOT shell out.** `Read` pages large files natively (use its `offset` / `limit` parameters if needed). Do not use `cat`, `head`, `wc`, `find`, or `python3 -c` loops on the transcript — those trigger a permission prompt for every invocation and are unnecessary.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
import sys
from pathlib import Path

sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent.parent / "lib"))
from entity_io import get_trajectories_dir # noqa: E402


def main():
try:
Expand All @@ -23,7 +20,7 @@ def main():
if transcript_path:
session_id = Path(transcript_path).stem.removeprefix("claude-transcript_")
if session_id:
saved_trajectory = str(get_trajectories_dir() / f"claude-transcript_{session_id}.jsonl")
saved_trajectory = f".evolve/trajectories/claude-transcript_{session_id}.jsonl"
reason += f" The saved trajectory path is: {saved_trajectory}"

print(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
import tempfile
from pathlib import Path

sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent.parent / "lib"))
from entity_io import get_trajectories_dir # noqa: E402


_log_file = None

Expand Down Expand Up @@ -41,6 +38,20 @@ def log(message):
pass


def get_trajectories_dir():
evolve_dir = os.environ.get("EVOLVE_DIR")
if evolve_dir:
base = Path(evolve_dir) / "trajectories"
else:
project_root = os.environ.get("CLAUDE_PROJECT_ROOT", "")
if project_root:
base = Path(project_root) / ".evolve" / "trajectories"
else:
base = Path(".evolve") / "trajectories"
base.mkdir(parents=True, exist_ok=True, mode=0o700)
return base.resolve()


def main():
try:
input_data = json.load(sys.stdin)
Expand Down
152 changes: 0 additions & 152 deletions tests/platform_integrations/test_stop_hooks_path_resolution.py

This file was deleted.

Loading