Skip to content

refactor(agent): stop depending on prompt - #10023

Closed
404Wolf wants to merge 2 commits into
mainfrom
wolf/reorg-agent-drop-prompt
Closed

404Wolf wants to merge 2 commits into
mainfrom
wolf/reorg-agent-drop-prompt

Conversation

@404Wolf

@404Wolf 404Wolf commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Why

agent depended on prompt for one function,
connected_toolsets::render, the system-prompt section that names the
user's connected integrations. prompt is the most edited high-fan-out
crate in the workspace, and because nearly every service reaches agent,
that edge put prompt in the dependency closure of 151 crates. Every
prompt wording change rebuilt all of them. This is fix N12 of the repo
reorganization plan.

MACRO-4958

How it works

  • Moves connected_toolsets.rs (the section and its tests) from prompt
    into agent as a private module, called from the same place in
    agent_loop.rs. Nothing else used it.
  • agent drops its prompt dependency. prompt is now in 36 crates'
    closures (151 before, from .github/workspace-dep-closures.json).
  • The section text is unchanged.

agent called one function from prompt, the connected-integrations
section it appends to every system prompt. prompt is the most edited
high-fan-out crate, and that one edge put it in the closure of every
crate that reaches agent, so each prompt edit rebuilt 151 crates.

Move the section into agent and drop the dependency. prompt is now in
35 closures.

MACRO-4958
@macro-application

Copy link
Copy Markdown

@404Wolf 404Wolf added the run-ci Run CI on the PR's head commit; removed when the run starts label Nov 6, 2026
@github-actions github-actions Bot removed the run-ci Run CI on the PR's head commit; removed when the run starts label Nov 6, 2026
@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Refactor
    • Updated how connected-toolset prompt content is assembled. The section continues to appear when available, with no described change to its user-visible behavior. Other dependency-closure entries remain unchanged in the reviewed changes.

The agent crate now renders the connected-toolset prompt section through its own private module. The prompt crate no longer declares that module publicly. The agent crate removes its direct path dependency on prompt, and the generated workspace dependency-closure map removes crates/prompt from the listed closures.

Merge Risk: Moderate · previous review 8b40e

Resolve the conflict with main and rerun CI before merging.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title follows conventional commits format, is under 72 characters, and describes the main change.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description matches the changes to move connected_toolsets into agent and remove the prompt dependency.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between fdb0aba and 8b40ef5.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock, !**/Cargo.lock
Files selected for processing: 7

  • .github/workspace-dep-closures.json
  • crates/agent/AGENTS.md
  • crates/agent/Cargo.toml
  • crates/agent/src/agent_loop.rs
  • crates/agent/src/connected_toolsets.rs
  • crates/agent/src/lib.rs
  • crates/prompt/src/lib.rs
Files with no reviewable changes: 3

  • crates/agent/Cargo.toml
  • crates/prompt/src/lib.rs
  • .github/workspace-dep-closures.json

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.

…-prompt

# Conflicts:
#	.github/workspace-dep-closures.json
#	Cargo.lock
@404Wolf 404Wolf added the run-ci Run CI on the PR's head commit; removed when the run starts label Nov 7, 2026
@github-actions github-actions Bot removed the run-ci Run CI on the PR's head commit; removed when the run starts label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

@404Wolf

404Wolf commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Folded into the single reorg PR #10111 (one PR for the whole reorganization). Its commits are there; closing this one.

@404Wolf 404Wolf closed this Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant