Repository navigation
Give rooms a goal and send its lessons to the room's rounds (#174) - #258
Merged
Merged
Conversation
`room create --goal GOAL` (and the TUI create dialog's Goal field) fixes a goal for the room's life, stored verbatim in the new nullable rooms.goal column. Every round of that room also gets the project's lessons promoted with --scope GOAL, matched exactly as typed, because promote keeps its scope and source_key verbatim. Board.project_lessons(project_id, goal=) adds those lessons; goal=None is the unchanged query, so run, start and goal-less rooms see no goal lessons. The CLI and TUI previews mark goal lessons "(goal G)". room list/show, the TUI room pane, room compare/export and the TUI Compare view show the goal (room.goal in JSON, additive). A whole-project promote from a goal room prints the --scope= command that would limit the lesson to the goal. The TUI goal field is an ExactInput, so a pasted value reaches the validator whole instead of being cut to its first line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The promote dialog's scope field becomes an ExactInput: a plain Input keeps only a paste's first line, so a scope copied from a room goal such as one with a Unicode line separator was stored shortened and never reached that room. A test now hands a goal lesson to a detached worker without skipping it, and the guides note that the promote hint prints no command for a goal the terminal cannot show unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…174) The detached goal test now runs the real launcher and reads the --lessons-fd payload the worker gets, resolved from the board through the room's goal. The TUI round dialog's replace hint adds "--scope GOAL" when a goal lesson is listed, as the CLI preview does: board decide --supersedes refuses a replacement in another scope. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A promote run with --repo printed a hint command without it, so copying the command from another directory looked for the room in the wrong project. The hint now adds --repo when one was given, as the other printed commands do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-up 3 for #174, after #245, #250 and #253. A room can now have a goal, and its rounds get the lessons promoted for that goal. Until now
room promote --scope GOALmade a lesson that reached only board items of that goal, and never a room round.This was the last follow-up listed on #174. This PR does not close the issue; whether anything is left on it is your call.
What changes
A goal per room
room create --goal GOAL, or the new Goal field in the TUI create dialog, sets the goal once for the room's life. There is no way to change it: to work toward another goal, close the room and create a new one.rooms.goalcolumn, added through the existing migration tuple. Rooms created before this change readNULL, meaning no goal.rooms.normalize_goalvalidates it on the text as given:"\ng"cannot slip through;room promote --scopeand its retry key (source_key) keep the scope as typed. Stripping only the room side would make a lesson promoted with--scope " g "unreachable from any room, and normalizing the promote side would change the identity of lessons that already exist.Lessons
Board.project_lessons(project_id, goal=)adds the active lessons whose scope equals the goal exactly, in the same oldest-first order.goal=Noneruns the same query as before, sorun,startand rooms without a goal see no goal lessons.room round(foreground and--detach) and the TUI round dialog resolve lessons with the room's goal. The detached worker still gets exactly the listed (id, text) pairs over--lessons-fd.(goal G). The replace hint adds--scope GOALwhen a goal lesson is listed, becauseboard decide --supersedesrefuses a replacement in another scope.Where the goal shows
room createandroom listprint it;room showreturns it throughget_room.room compareshows it as a text line;room exportputs it in a fenced Markdown block; the JSON form hasroom.goal(nullwithout one). The field is additive, soschema_versionstays 1.Promotion
--scopestill defaults to the whole project.--scope=GOAL, so a goal starting with-still parses, and adds--repowhen you gave one;tui_render.ExactInput. Textual 8.2.8'sInputkeeps only the first line of a paste and runs each class's_on_pastealong the MRO, soExactInputcallsprevent_default()and inserts the whole paste. As a result:g;Not in this PR
start --goal/run --goal.start --comparecreates a room, butstartfalls back to a single-agentrun, which has no goal. Adding it would mean either a new goal reach for plain runs or a flag that works on only one branch ofstart.start --comparerooms stay goal-less.Tests
tests/test_room_goal.pycovers:--lessons-fdpayload for a goal lesson;runstill excluding goal lessons;--repo, and with an escaped goal;ExactInputsubclassesInput,PlainStaticalready escapes, and the create error message carries no goal text.room.goalas an additive key, and two fakes acceptgoal=.uv run pytest -q: clean on macOS.Review
--repohint), fixed in the last commit.🤖 Generated with Claude Code