feat(prompts): rank the session's standing context for the writer - #21
Merged
Conversation
Catalyst Phase 1 sends pinned guidance, verified examples from earlier turns, and the previous failure on the same query. Position alone is ambiguous: without being told, standing guidance reads either as another old instruction to ignore or as an override of the request in front of it, and both are wrong. Guidance is now stated as standing requirements that the current instruction outranks, with the later entry winning a conflict. Examples and failures are named as evidence about this data -- learn the columns, joins, and mistakes, do not copy the SQL or mistake it for the request. The catalog and the read-only policy outrank all of it.
Catalyst's generation grammar has admitted three statuses since G3b, but this prompt still said the stage was "constrained to a `ready` candidate". A branch the prompt forbids is a branch the writer never takes: the only way out of an ambiguous or unanswerable question was to invent a query for it, which is the failure Phase 1 exists to remove. State all three answers and when each applies. `ready` stays the expected one. `needs_clarification` is for a request this catalog could answer if we knew which answer was meant -- ask the shortest settling question, name the choices, do not guess a default. `unsupported` is for a request no query over the approved views could answer however worded, and explicitly not for a concept the writer merely failed to find: model exhaustion is a reason to ask, never a claim about the data. Also state what a revision with no `editorSnapshot` means. That request shape now exists -- it is a person answering the question the writer asked, on a session that holds no query -- and without a rule for it the writer would apply "revise the editor artifact" to an editor that is not there.
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.
Companion to Catalyst Phase 1 (delivery gate G4 — layered context). Catalyst now sends
revision.sessionContext: guidance a person pinned to the session, verified examples from earlier accepted turns, and the one prior failure on the same query.The writer prompt has to rank them, because position alone is ambiguous to a model. Unlabelled, standing guidance reads either as another entry in the history it is told to ignore, or as an override of the request in front of it — and both readings are wrong.
The prompt now states:
Catalyst withholds the layer entirely from a Hub that does not advertise
catalyst.query.session-context.v1, so this prompt and that capability ship together.Evidence: 692 passed. The new test pins each layer's name and its stated precedence, so a future edit cannot quietly drop the ranking.