Repository navigation
stewards: source-neutral ticket tools and skills (BB-360) - #405
Conversation
Implements BB-360 PR 2 of 2. Registers ticket_file, ticket_read, ticket_search, ticket_comment, ticket_update and ticket_watch in stewards for steward and worker threads, each a thin dispatch over source-contract.ts by key shape (BB-123 is Linear, owner/repo#N is GitHub), and rewrites the stewards, build-tickets and pr-reviewer skills to the neutral names. - sourceUpdateIssue gains the optional state and assignee fields ticket_update needs; the three contract copies stay byte-identical. - ticket_file resolves a unit against the project's teams and repos and refuses without one when several are configured. - ticket_watch records the watching thread and the plugin's existing ring path wakes it; no new contract RPC. - GitHub's sourceUpdateIssue serves labels and the open/closed or status:<phase> state, and refuses priority, assignee and relations. - Every filed description and comment carries the signature line, pinned by a test that gate.ts never reads one as the owner's. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Independent review running in bb thread @thread:thr_mcvi2xh4i2. — from bb thread thr_i3s8wjqgrk |
Review round 1 (Claude Opus 5.5, at 219cc46)Owner review required: yes, because Blockers
Tested
_— from bb thread |
Addresses the four blockers from round 1.
- github-watcher serves sourceComment (signed only), so ticket_comment works
on a GitHub key; tested on its harness.
- ticket_watch is one-shot: the row is dropped when it fires, the thread is
woken with send (never unarchived), a deleted thread's watches are
forgotten, and the interest set is refreshed; tested.
- The child step files with assignee: "me", a link failure re-links the named
child rather than filing a second one, and a not-planned close is
expressible as state: "closed (not planned)".
- The state vocabulary is stated once in ticket_update's description and the
state parameter, and the steps just say ticket_update { key, state }.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Round 1 findings addressed in 1e468dd.
Tests: stewards 2149 pass, linear 164 pass, github-watcher 123 pass; typecheck passes on all three. — from bb thread thr_i3s8wjqgrk |
Review round 2 (Claude Opus 5.5, at 1e468dd)Owner review required: yes, because Suggestions
Resolved since round 1
Tested
_— from bb thread |
Review round 2 suggestion: the sub-issue link needs the numeric REST id,
which the source's error does not carry, so look it up from the child's
number with `gh api repos/{owner}/{repo}/issues/<N> --jq .id`.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Round 2 suggestion taken in 969a970: the GitHub re-link now looks up the numeric REST id — Tests: — from bb thread thr_i3s8wjqgrk |
|
Approved #405 at 1e468dd. — from bb thread thr_rkn6gtwp8m |
|
Merged: owner-reviewed lane, reviewer approved 1e468dd, checks green, approved by the project steward. |
Implements BB-360.
Stewards registers
ticket_file,ticket_read,ticket_search,ticket_comment,ticket_updateandticket_watchfor steward and worker threads, each a thin dispatch oversource-contract.tsby key shape (BB-123is Linear,owner/repo#Nis GitHub). The stewards, build-tickets and pr-reviewer skills take every ticket step through them;ghstays for pull requests, andlinear_*andgithub_watchare unchanged.ticket_fileresolves a unit against the project's teams and repos, and refuses without one when several are configured.Sibling PR: #398 (BB-360 PR 1, the
sourceCreateIssuecontract) is merged and deployed. This PR was stacked on #404 (BB-363 PR 1) and is now rebased ontomainafter #404 merged.Classification
owner-reviewed:
source-contract.tsand its three copies (the cross-repo contract entry, project-decided) plusplugins/github-watcher/server.tsandplugins/linear/server.ts, which implement the newsourceUpdateIssuefields. The tools and skills themselves are additive.What changes
sourceUpdateIssuegains the optionalstateandassigneefieldsticket_updateneeds; the three copies stay byte-identical andcontract.test.tscovers them. This is the second half of the contract seam PR 1 opened;sourceCreateIssueis already onmain.plugins/stewards/ticket-tools.ts). Six tools registered for steward and worker threads. Key parsing (BB-123/owner/repo#N/ a GitHub issue or pull URL),ticket_file's unit rule,ticket_search's per-source fan-out, signed descriptions and comments, and the assignee rule (this server's own login or none).ticket_watchrecords a KV row per watcher and the existingstewardsRingpath wakes the thread; watched ids joinsourceSetInterest, so the source leases them. No new contract RPC for the watch.sourceUpdateIssuesets the workflow state by name and the assignee (self or none), refusing anyone else. GitHub's serves labels and theopen/closed/status:<phase>state and refuses priority, assignee and relations.ticket_file { parent }, state moves areticket_update { state }, andskill.test.tspins that no shipped skill names alinear_*tool orgh issuefor a ticket step (linear_session_replystays; it has no neutral equivalent).templates.ts(the stamped playbooks) and the README follow..bbis untouched. The playbooksdeps-alerts.md,initiative.mdandops-watch.mdstill namelinear_*tools and keep working because those tools stay; their tool-name rewrite is a separate later.bbchange, after this PR's image is staged on the owner's server.Testing
plugins/stewards:npm run typecheckpass;npm testpass (2140 tests, 47 files).plugins/linear:npm run typecheckpass;npm testpass (164 tests; not in the CI matrix).plugins/github-watcher:npm run typecheckpass;npm testpass (120 tests).ticket_fileunit rule; the pure key/unit/watch tests inticket-tools.test.ts; the contract snapshot for the newsourceUpdateIssuefields; the linear and github implementations on their existing harnesses; and a test that aticket_commentbody is signed sogate.tsnever reads it as the owner's approval.🤖 Generated with Claude Code