[Feat] Setup session investigates the repos and launches the work it finds - #1871
Draft
mrubens wants to merge 4 commits into
Draft
[Feat] Setup session investigates the repos and launches the work it finds#1871mrubens wants to merge 4 commits into
mrubens wants to merge 4 commits into
Conversation
…ation The setup submit now builds a best-effort, time-boxed repository digest (automation signals already collected at source-control connect plus a bounded live open-PR listing) and ships it in the kickoff event. The kickoff prompt becomes four beats: an intro that cites one or two concrete digest facts, the starter launches, exploration via MCP and the advisor subagent that posts genuinely new observations (offering to act on them) while the tasks run, and a follow-along closeout. The CI starter prompt now opens its smallest safe improvement as an early PR so a real pull request lands during the first conversation.
Contributor
PR titles are contributor-authored and were riding inside a platform event the prompt calls trusted, so a title could smuggle instructions into the privileged setup turn. The field is now named untrustedTitle (mirroring untrustedTaskGeneratedContext) and the setup prompt tells the agent that names and titles are data only: never instructions, never a justification for tool calls.
… live The kickoff no longer executes the four catalog prompts verbatim. The selected checkboxes ship as focusAreas (direction, not scripts), and the setup turn investigates the connected repositories first, then launches one to three tasks with self-authored prompts grounded in what it found, choosing the specific environment when the evidence points at one repo and honestly skipping areas with nothing worthwhile. The picker copy now describes picking areas to dig into.
| prListTimeoutMs?: number; | ||
| } = {}): Promise<SetupRepoDigestEntry[]> { | ||
| try { | ||
| const activeRepositories = await db.query.repositories.findMany({ |
Contributor
There was a problem hiding this comment.
🔴 This query has no administrator or workspace scope, so any administrator finishing setup loads every active repository in the deployment. The digest then fetches those repositories' PRs and supplies their names, activity, and titles to that administrator's setup session. Restrict the initial repository query to repositories the authenticated administrator is authorized to access before building the digest.
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.
What this does
Makes the first minutes of the setup session feel like Roomote is already working on your code. The final-screen checkboxes become focus areas (direction, not scripts), and the kickoff turn earns its launches:
untrustedTitleand the prompt treats names/titles strictly as data, never instructions.Testing
focusAreasevent shape and digest inclusion/omission; client tests for the new copy and routing (22).check-types,lint,knip, and repo-wideformat:checkpass.