move plugin/skill instructions into dev msg and reorder#14609
move plugin/skill instructions into dev msg and reorder#14609charley-oai merged 7 commits intomainfrom
Conversation
| @@ -241,6 +246,15 @@ fn canonicalize_snapshot_text(text: &str) -> String { | |||
| if text.starts_with("<permissions instructions>") { | |||
There was a problem hiding this comment.
one note-- the <permissions instructions> tag is the only one that doesn't use underscores, i.e., <permissions_instructions>. can bring inline, but didn't want to touch as part of these changes.
0e87352 to
232d829
Compare
| ## Local Compaction Request | ||
| 00:message/developer:<PERMISSIONS_INSTRUCTIONS> | ||
| 01:message/user[2]: | ||
| [01] <AGENTS_MD> |
There was a problem hiding this comment.
snapshots dropping <AGENTS_MD> is expected; get_user_instructions() used to carry the general Skills/Plugins sections, so the wrapped user-instructions message often existed even when there was no real project doc content. After moving those sections into the developer message, that wrapper is now only present when there is actual user/project-doc-style content, so snapshots like this legitimately drop <AGENTS_MD>.
There was a problem hiding this comment.
Ah would be nice to update the test to still show legit agents.md but that's out of scope, I think we should update these tests to show every kind of fragment (and like auto fold over all of them so when a new on is added it gets auto tested) but anyways
| let (mut session, mut turn) = crate::codex::make_session_and_context().await; | ||
| let temp_cwd = TempDir::new()?; | ||
| let mut config = (*turn.config).clone(); | ||
| config.cwd = temp_cwd.path().to_path_buf(); |
There was a problem hiding this comment.
make guardian tests hermetic; some platforms would find agents.md and others wouldnt. so now we pass a temp dir.
|
@codex review this |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
| ## Local Compaction Request | ||
| 00:message/developer:<PERMISSIONS_INSTRUCTIONS> | ||
| 01:message/user[2]: | ||
| [01] <AGENTS_MD> |
There was a problem hiding this comment.
Ah would be nice to update the test to still show legit agents.md but that's out of scope, I think we should update these tests to show every kind of fragment (and like auto fold over all of them so when a new on is added it gets auto tested) but anyways
a9dc8f2 to
af55151
Compare
Move the general
Apps,SkillsandPluginsinstructions blocks out ofuser_instructionsand into the developer message, with newApps -> Skills -> Pluginsorder for better clarity.Also wrap those sections in stable XML-style instruction tags (like other sections) and update prompt-layout tests/snapshots. This makes the tests less brittle in snapshot output (we can parse the sections), and it consolidates the capability instructions in one place.
Tests
Updated snapshots, added tests.
<AGENTS_MD>disappearing in snapshots is expected: before this change, the wrapped user-instructions message was kept alive bySkillscontent. Now thatSkillsandPluginsare in the developer message, that wrapper only appears when there is real project-doc/user-instructions content.