add --self gate to /do:next: claim only issues you filed#97
Merged
Conversation
A security feature for issue mode: /do:next --issues --self restricts every claim (auto-pick, --swarm batch, and explicit #num) to issues whose author is the running gh account (@me), so on a shared tracker the agent never picks up or acts on the instructions embedded in an issue filed by someone else. Auto-pick filters others out at the API (--author @me); an explicit number for another user's issue is refused, not overridden -- the one skip a deliberate cherry-pick can't cross, because it's a security boundary not a curation preference. Persisted via /do:config --self (global or per-project).
…m workers so a per-run override beats the saved self default
… ownership check so a fresh run doesn't read an empty var
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.
Summary
Adds a
--self/--no-selfsecurity flag to/do:nextand a persistentselfkey to/do:config. When--selfis on,/do:next --issuesonly claims GitHub issues whose author is the authenticated account (@me) and never considers an issue filed by anyone else — so on a shared/multi-contributor tracker the agent never picks up (or acts on the instructions embedded in) a third party's issue.It's a hard security boundary applied to all three claim paths:
gh issue list --author "@me", so other people's issues never load.--swarmbatch — Phase A applies the same filter; the orchestrator's resolved self mode is threaded to each worker as an explicit--self/--no-selfso a per-run override beats a saved default.#<num>— the author is verified before claiming; an issue filed by someone else is refused, not overridden. This is the one skip a deliberate cherry-pick cannot cross.Scoped to issues mode (PLAN.md items have no author) and GitHub (issue mode already is). Persist with
/do:config --self(global or per-repo--project);--no-selfoverrides a saved default for one run.Files:
commands/do/next.md,commands/do/config.md,lib/review-config-defaults.md,README.md,.changelogs/NEXT.md.Test plan
npm test— 156/156 pass (no code paths changed; these are prompt-instruction docs).ISSUE_NUMbefore the explicit-#numownership check.--unsetvalid-keys lists, the show-config blocks, the README tables, and the lib precedence doc.