Repository navigation
feat(tools): gh read ops — issue_view, issue_list, pr_view - #39
Merged
Merged
Conversation
The agent can now read GitHub state itself; mission prompts no longer need to embed issue bodies. Whitelisted read ops, same argv validation discipline as the write ops: - issue_view NUMBER: --json number,title,body,state,url,labels, createdAt,closedAt - issue_list: --json number,title,state,url,updatedAt, optional state=open|closed|all (whitelisted) and limit (digits, 1..=200) - pr_view NUMBER: --json number,title,body,state,url,baseRefName, headRefName,mergeable,statusCheckRollup All free-form inputs (number/state/limit) validated before spawn; repo stays fixed at registration. Tool remains Risk::Write as a whole (per-op risk would need a trait change — noted for later); the approval prompt shows the exact read command anyway. Live validation: agent session read real issue #33 via issue_view and answered title + content correctly. 114/114 tests, clippy clean.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
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
Adds three whitelisted read operations to the
ghtool:issue_view(fetch one issue as JSON),issue_list(list issues, optionalstatefilter +limit), andpr_view(fetch one PR incl. mergeable + statusCheckRollup). All free-form inputs are validated before spawn —numberdigits-only,statewhitelist (open|closed|all),limitdigits 1..=200 — same argument-injection discipline as the write ops.--repostays fixed at registration.JSON field sets are deliberately minimal (no author emails, bounded payloads).
Why
E8 MVP gate retro, backlog item #1 (highest impact): the agent had no way to read issues/PRs, so every mission prompt had to embed the issue body manually. With read ops the agent can pull its own work items — mission prompts shrink to a pointer (
fix issue #33), and self-verification (CI status viapr_view.statusCheckRollup) becomes possible.Testing
--jsonfield quoting), and injection rejection (number=--repo,state=--limit,state=OPEN,limit=999, missingnumber).s-1a041d61c85-1418d4ranissue_viewon the real issue docs: README status line stale — says Phase 0 while Phase 2 is nearly complete #33 via the tool and answered its title and content correctly — the exact workflow this PR enables.