Skip to content

feat(prompt): drop misleading uv pip hint#88

Open
mikasenghaas wants to merge 6 commits into
mainfrom
feat/ipython-and-venv-prompt-notes
Open

feat(prompt): drop misleading uv pip hint#88
mikasenghaas wants to merge 6 commits into
mainfrom
feat/ipython-and-venv-prompt-notes

Conversation

@mikasenghaas

@mikasenghaas mikasenghaas commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

After merging the IPython control guidance from #90, this PR no longer carries a separate IPython prompt rewrite.

The remaining change removes the misleading system-prompt hint to install packages with uv pip install <pkg>. That hint points agents toward mutating the IPython kernel environment, which conflicts with the target-runtime guidance now on main.

Verification

  • uv run ruff check .
  • uv run ruff format --check .
  • uv run pytest tests/test_prompt.py
  • uv run pytest tests/

Spell out two things the ipython tool's environment didn't make obvious:

- ipython treats `!cmd` per-line; multi-line shell needs `%%bash`.
- the rlm tool's uv env is NOT the project venv, so `import <project>`
  requires sys.path tweak / running under the project interpreter / editable install.

Both have cost agents wasted turns on swebench-pro.
Reframe the ipython usage block:
- Lead with 'ipython is your scratchpad' (Python state, notes, context).
- Make 'cells default to Python' explicit, since the model's prior keeps
  pushing bare `find ...`/`grep ...` into cells and getting SyntaxError.
- List concrete BAD/GOOD antipatterns instead of prose so the rule is
  easy to pattern-match.
- Move the pre-installed package list into this block, drop the
  'uv pip install <pkg>' line — that line was misleading on the kernel's
  uv-tool environment (no .venv -> 'no virtual environment found').
- Drop the 'project venv' commentary; let env-specific append handle it.

Also nudge 'breaking down into sub-tasks' in the opening sentence.

Validated on rlm-swe SWE-bench Verified n=95 glm-5.1: 64.2 % solve
(+6.0 pp vs prior prompt at the same model + dataset).
The conversation log path is internal plumbing — the agent doesn't need
to know it, and a system-prompt line per rollout is just per-request
token overhead. messages_path is still threaded through the function
signature for callers that may use it programmatically.
Drop the bulleted list + BAD/GOOD antipattern table in favor of a single
assertive paragraph: frame ipython as the primary working surface /
persistent scratchpad, state that cells are Python by default, and fold
the shell-escape rule (! / %%bash, bare commands fail) into prose. Keeps
the pre-installed-imports note.
…-prompt-notes

# Conflicts:
#	src/rlm/prompt.py
@mikasenghaas mikasenghaas changed the title feat(prompt): scratchpad framing + ipython/shell antipatterns feat(prompt): ipython scratchpad block, drop conversation-log / uv-pip lines Jun 5, 2026
@samsja samsja marked this pull request as ready for review June 6, 2026 02:03
@samsja samsja changed the title feat(prompt): ipython scratchpad block, drop conversation-log / uv-pip lines feat(prompt): drop misleading uv pip hint Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants