Repository navigation
sec-default: the system prompt's sections continue past the user tier - #97241
Merged
Merged
Conversation
…; the declarations carry prompt.compose
This was referenced Sep 25, 2026
…rson's plugin asks first, and the declarations as the event shipped
poteat
enabled auto-merge (squash)
September 29, 2026 19:05
bhosmer-ant
approved these changes
Sep 29, 2026
bhosmer-ant
left a comment
There was a problem hiding this comment.
The hook line mirrors the prompt.section one, and the declarations match what the CLI generates. One note: this and #97334 both add tests/fixtures/rewording.ts with different contents, so the second to merge will conflict.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prompt.compose, whose hooks answer the system prompt as an ordered list of sections, joins the rows that continue past the user tier (next.to(e, "append")).Notes
prompt.section,prompt.context) already continues past the user tier here; this one's chain ends in the engine's own composition. Without this row a person's plugin could drop, reorder or rewrite a section, change the facts the list is composed from, or answer a list of its own, on a machine its organization manages.prompt.submiteverywhere.prompt.composeas the CLI declares it, and nothing else.testcheck is red for now, by construction: it installs the published CLI, and a CLI that does not know the event refuses a hooks module that names it ("prompt.compose" is not an event), so sec-default's suite fails there while the other mods pass. It turns green with the first published CLI that carries the event; the tests are not loosened.Test Plan
claude --plugin-diron a mod whoseprompt.composehook drops a section, rewords one, or answers a list of its own: the request is unchanged.claude plugin test mods/sec-defaultis green on a CLI that carries the event.Checked on a CLI built with the event: the three mods above leave the request byte-identical to the one with no mod; with the row removed and the CLI rebuilt, the section is gone, the rewording lands and the third mod's text is the composed prompt.
Changelog