Repository navigation
A play's Edit chat describes the play first, and a reply is routed with the message it answers (closes #3738) - #3747
Conversation
Pragmatic Code Review: PR #3747 (closes #3738)Review Type: Initial review (no prior reviews). Head SummaryThe change is a clear net improvement and is well contained. Every pin-specific branch is gated on Requirements Check
Issue technical note "run the routing scenarios before and after, three repetitions, and record both": ❌ still being produced. Code Review Findings🟡 Important1. The Stage-1 skip and the forced pinned lead apply to any options the last assistant message offered, not only the opening message's
Failure scenario, verified by reading (not run): in a play's Edit chat the user changes topic, "add a task to review this play". Node Creation asks "Which project?" with options "Website" / "Mobile". The user picks "Website". Before this PR the reply was an answer to a clarification, so Stage 1 saw the blended conversation and wrote a query for creating a task. Now The on-topic case (Play Authoring asks "Which rule?" and the user picks a rule name) benefits from the same code, so the generalisation is not wrong everywhere. Recommendation: either (a) restrict the skip and the forced lead to options that came from the system-written opening message, or from a turn the pinned skill led; or (b) keep the skip for later options but retrieve on 2. Any follow-up of one or two words, or containing Recommendation: before merge, record the before/after routing results the issue asks for, and make sure the scenarios include standalone follow-ups that contain these words. If any regress, the cheapest tightening is dropping 🟢 Suggestions3. In a pinned chat no lookup gets the system-run search backstop, including lookups that are not about the pinned node
4. Only the lookup path makes explaining a play read-only "Explain this play" and lookup-shaped questions lose 5. Author text goes into the stored markdown message unescaped
6. "Its rules can't be read" can be followed by the rules
Nitpicks
Standards checkNo literal Recommendation: REQUEST CHANGESSmall and specific: resolve finding 1 (restrict or soften the option skip for options the pinned skill did not offer, with a test), and record the routing before/after results for finding 2. The hosted OpenAI-compatible check (criterion 8) stays open and needs either a run or an explicit decision to close the issue without it. Findings 3 to 6 and the nits are optional. |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: REQUEST CHANGES (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Address-review summaryCommits since the review: Addressed
Skipped
Routing measurements (Gemma 4 E4B, isolated daemon)
The one-scenario routing difference is Edit chat on the final head, each as the first reply in a fresh chat: "Change when it runs" and "Add a rule" skip Stage 1 and are led by Play Authoring; "Explain this play", "when would this fire?" and "what does this condition mean?" are lookups with no write tool offered and are answered from the rules; "I don't understand it" is Not doneThe hosted OpenAI-compatible check is filed as #3750. Re-Review DecisionDecision: RE-REVIEW NEEDED Rationale: two Important findings were addressed with changes to routing logic (which replies skip Stage 1, and which messages are framed as replies). |
Pragmatic Code Review: PR #3747 (closes #3738)Review Type: Re-Review. Scope: SummaryBoth Important findings are fixed in code, and the fixes are small and match what they claim. No Critical issues and nothing blocking. Two things are left for the author to weigh: the option skip is now narrower than the on-topic case needs (new finding A), and the six-word cap still leaves the first review's own example sentences in the reply frame (finding 2, residual). Previous Review Summary
Status of previous findings
New findings🟡 Important (non-blocking)A. An opening option picked on any turn after the first loses both protections, and that flow is unmeasured The fix for finding 1 went further than the review's option (a): the options count only on the reply to the opening message, not for the opening message's options in general. So "Explain this play" followed by "Change a condition" in the same chat (the flow the first option exists to invite) puts the second message to Stage 1 and does not force the pinned lead. Recommendation: measure the two-turn flow once (Explain, then each change option). If it holds, say "first reply only" in ADR-090 §5 with the docs push. If it does not, widen 🟢 SuggestionsB. Finding 2 residual: the cap fixes the measured sentence, not the review's examples All five standalone examples the first review named are still framed as replies: "add a note that Bob called", "create a task for this week", "what did I finish last week?", "how many tasks have no owner?" (six words each) and "list tasks" (two). The doc comment says so honestly, and the author reports identical per-turn decisions across the routing fixture and follow-up chats, so this is accepted on the evidence given. Two cheap additions: put one or two of those sentences through a follow-up turn in the next measurement pass, and pin the boundary in the unit test (a six-word and a seven-word message with the same pointing-back word). Today the standing cases are nine and ten words, so changing the constant to 7 or 8 fails no test. Related, pre-existing: words are split on every non-alphanumeric character, so "twenty-one" contributes the pointing-back word "one" ("add twenty-one tasks" leans), and contractions count double toward the cap ("what's the first one's status?" is seven words and does not lean). C. A play with an empty rule list and another undecodable field is still called unreadable
Nitpicks
Standards checkNo literal Recommendation: APPROVEBoth blocking findings from the first review are fixed, with tests, and the two commits introduce no correctness or safety regression. Finding A is the one to act on before or shortly after merge: one measurement of the Explain-then-change flow decides whether it is a docs sentence or a three-line widening. B, C and the nits are optional. Three docs files are uncommitted in the docs checkout and should be pushed just before |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review (re-review): APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Address-review summary (re-review)Commit since the re-review: Addressed
Skipped
TestsAgent and daemon unit tests: 1,431 pass. Re-Review DecisionDecision: RE-REVIEW NEEDED Rationale: the rule for which turns skip Stage 1 changed again. It is the change the re-review proposed and it is measured, but it is routing logic addressing an Important finding. |
Pragmatic Code Review: PR #3747 (closes #3738)Review Type: Re-Review (second). Scope: SummaryThe commit does what the last review proposed, no more. Finding A is fixed by the widening that review suggested, C is fixed, and the six-word boundary from B is now pinned. I found no correctness or safety regression. What remains is one narrow, unmeasured collision case and a few stale comments. Previous Review Summary
Status of previous findings
Is the widening safe? (the consumer in
|
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review (second re-review): APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Address-review summary (second re-review)Commit since the second re-review: the head commit, "Address re-review: correct three comments and name the test's messages". Addressed
Skipped
Tests
Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: the second re-review approved with no Critical or Important findings, and the only change since is comments and a test's setup. |
…e it answers (refs #3738) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The Stage-1 skip and the pinned lead apply to the reply to a chat's opening message only; a later clarification's options are its asker's - A play's rules are called unreadable only when they did not decode - Of two pinned skills the first one pinned leads a picked option - clarify_pinned is listed among the routing decisions Skipped: the lookup backstop stays off for every lookup in a pinned chat (the trade is recorded in the docs); rule text is not escaped in the opening message (the author's own text, and a link in it is a mention). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ssage Measured on the built-in model, a longer message shown the reply frame was routed as two tasks on every run. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e whole chat Measured on the built-in model, a change option sent after "Explain this play" was put to Stage 1 and answered with a question about which play. A stored empty rule list is a play with no rules, not unreadable ones. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
347719c to
393888f
Compare
Closes #3738.
What changes
The opening message describes the play, then asks.
create_play_edit_chatbuilds it from what the play stores, with no model call: the play's description, then each rule by name with its description, its trigger described from the trigger's fields (the play viewer's wording), each condition's and each action's description. Six options, "Explain this play" first.A reply is routed with the message it answers. Stage 1's follow-up frame has two forms. A request that stands alone gets the frame it always had, byte for byte. A message that leans on the one before it (the answer to a clarification, one of the opening message's options, one or two words, or at most six words with a pronoun, ordinal or yes/no) is framed as a reply to the conversation's last message.
Stage 1 cannot stop a chat that pins a skill.
route_clarifyfrom Stage 1 goes on to retrieval and Stage 2 with the pinned skill (routing_decision="clarify_pinned").get_playand neverupdate_play. The system-run search backstop does not replace a prose answer in such a chat.A chat that pins nothing routes as before: no prompt line, the same clarify outcome, the same lookup narrowing.
Measured on the built-in model (Gemma 4 E4B)
Isolated daemon, the seeded play "Complete a parent task when all its sub-tasks are done", each message sent as the first reply in a fresh Edit chat:
get_play, says when it runs and asks what it should change toclarify_pinnedThe prompt dump of a first reply carries the Play Authoring instructions, the pinned-node record and the play's rule.
Known and left alone: on "Change a condition" and "Change an action" the skill's question sometimes adds "please provide the name of the play". That is the skill's own behaviour, which the issue excludes. Rewording the pinned-node record was tried against it and made no difference, so it was reverted.
Sent after "Explain this play" in the same chat, each of the five change options also skips Stage 1 and is led by Play Authoring; none asks which play.
Routing measurements, main against this branch
clarification-then-fallthrough, 3 repsThe routing difference is one scenario on a single rep and is not claimed as a gain. 11d and 12d were excluded on both sides because their setup turns did not establish state. The measurements found one shift, since fixed: a longer message with a pointing-back word, shown the reply frame, was routed as two tasks; such a word now makes a reply only of a message of at most six words.
Not done
Tests
for_each, invariant), no rules, unreadable rules.bun run test:changedpasses.🤖 Generated with Claude Code