Skip to content

Add duplicate-check step to create-issue skill - #31

Merged
jeffhorn-nava merged 2 commits into
mainfrom
jeffhorn/19-create-issue-dedupe-step
Jul 10, 2026
Merged

Add duplicate-check step to create-issue skill#31
jeffhorn-nava merged 2 commits into
mainfrom
jeffhorn/19-create-issue-dedupe-step

Conversation

@jeffhorn-nava

Copy link
Copy Markdown
Collaborator

What

The create-issue skill had no step to catch a duplicate before filing, so a new issue duplicating an open one passed straight through unless a human happened to ask.

Closes #19

How

A new Step 1, "Check for duplicates," runs ahead of template selection: search all issues by keyword with gh issue list --state all --search, judge by whether the same work is already tracked rather than a shared topic, and handle three outcomes: comment on or update an open near-duplicate instead of filing; note in the body why a still-warranted new issue is not a duplicate; or get explicit confirmation from the person at the keyboard before filing over a plausible duplicate. Closing an issue as a duplicate applies the existing duplicate label. The remaining steps renumber 2 through 6. The phase-listing pointers in AGENTS.md and CONTRIBUTING.md and the skill's frontmatter description are synced to include the new step.

Test plan

Notes for reviewers

The create-pr counterpart of this gate, raised in an issue comment, is deliberately left to #27. No runtime surface changed, so no tests were added.

The skill ran straight from template choice to filing, so a new issue
duplicating an open one slipped through unless a human happened to ask
(as with the docs-spec finding that duplicated #2 during PR #4).

Add a search step ahead of drafting: search all issues by keyword, judge
by the work rather than a shared topic, and get explicit confirmation
before filing over a known potential duplicate. Sync the phase-listing
pointers in AGENTS.md and CONTRIBUTING.md and the skill description so
none drift.

Closes #19
@jeffhorn-nava

Copy link
Copy Markdown
Collaborator Author

Code review

Found 1 issue:

  1. The new "Check for duplicates" step claims gh issue list --state all surfaces PRs, but it does not: gh issue list returns only issues regardless of --state. Verified against this repo, --state all returns issue numbers only and none of the open/merged PR numbers. Since the step's stated goal is "a PR may already be doing the work," an author following it verbatim never actually checks PRs and could file a duplicate of already-open work. Use gh search issues --state all (spans issues and PRs) or add a separate gh pr list search.

GitHub numbers issues and PRs together, so `--state all` surfaces PRs too; a PR may already be doing
the work.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

Code review on PR #31 caught that gh issue list never returns PRs,
whatever its --state, so the step could not do what it claimed: catch a
PR that is already doing the work. Switch to gh search issues
--include-prs, which spans both, and omit --state to cover open and
closed.

Also require confirmation before closing an issue as a duplicate, to
match the human gate the rest of the step applies to outward-facing
actions.
@jeffhorn-nava

Copy link
Copy Markdown
Collaborator Author

Fixed in 66cf00b. gh issue list never returns PRs regardless of --state, so the step now uses gh search issues --include-prs, with --state omitted to cover both open and closed. I also corrected the definition of done in #19, which had prescribed the --state all command this bug originated from.

@jeffhorn-nava
jeffhorn-nava marked this pull request as ready for review July 9, 2026 22:27
@jeffhorn-nava
jeffhorn-nava merged commit 3d95ea5 into main Jul 10, 2026
2 checks passed
@jeffhorn-nava
jeffhorn-nava deleted the jeffhorn/19-create-issue-dedupe-step branch July 10, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a duplicate-check step to the create-issue skill

2 participants