Skip to content

Commit 4e83b4e

Browse files
committed
Add duplicate-check step to create-issue skill
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
1 parent 82fdee2 commit 4e83b4e

3 files changed

Lines changed: 42 additions & 9 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Use the template that best fits the work; GitHub surfaces these on new-issue.
9393
For `technical-task.md`, fill "Starting point" and "Constraints and gotchas" thoroughly; those are
9494
what an agent or new developer needs to pick up work cold.
9595

96-
The `create-issue` skill guides choosing the template, wording, labeling, reviewing, and filing.
96+
The `create-issue` skill guides checking for duplicates, choosing the template, wording, labeling, reviewing, and filing.
9797

9898
## Architecture and CI
9999

CONTRIBUTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
The short version of how a change moves through this repo:
66

77
1. **Start from an issue.** File one with the template that fits the work (epic, story, bug,
8-
technical-task, spike, or chore). The `create-issue` skill walks you through choosing a template,
9-
wording it for its audience, reviewing it, labeling it, and filing it.
8+
technical-task, spike, or chore). The `create-issue` skill walks you through checking for
9+
duplicates, choosing a template, wording it for its audience, reviewing it, labeling it, and
10+
filing it.
1011
2. **Branch.** Use the naming shape in [Branching](#branching) below.
1112
3. **Make your changes.** Keep commits terse and explain why, not what. Wire up the commit template
1213
(see [Commit message template](#commit-message-template)).

skills/create-issue/SKILL.md

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: create-issue
3-
description: Guides filing a new GitHub issue: picks the right template, writes it in the right register, applies the matching label, reviews the draft, and files it. Use when opening a new issue for this repo.
3+
description: Guides filing a new GitHub issue: checks for duplicates, picks the right template, writes it in the right register, applies the matching label, reviews the draft, and files it. Use when opening a new issue for this repo.
44
---
55

66
# Create Issue
@@ -16,7 +16,39 @@ sure which template fits or how technical the wording should be.
1616

1717
## Steps
1818

19-
### 1. Choose the template
19+
### 1. Check for duplicates
20+
21+
Before choosing a template or writing anything, search existing issues for one that already tracks
22+
this work. Search open and closed together, since a `wontfix` or already-closed duplicate changes
23+
whether to file at all:
24+
25+
```bash
26+
gh issue list --repo navapbc/strata-documentation-engine --state all --search "<keywords>"
27+
```
28+
29+
GitHub numbers issues and PRs together, so `--state all` surfaces PRs too; a PR may already be doing
30+
the work.
31+
32+
Judge by the work, not the topic: two issues that merely mention the same subject are not
33+
duplicates. A duplicate tracks the same change or investigation. Then:
34+
35+
- **A near-duplicate is open** → comment on or update it instead of filing, and stop here.
36+
- **A new issue is still warranted** → proceed, and note in the body why it is not a duplicate of the
37+
ones you found (link them).
38+
- **You still intend to file over a plausible duplicate** → surface it to the person at the keyboard
39+
and get their explicit confirmation before continuing. Never file silently over a known potential
40+
duplicate.
41+
42+
When resolving this means closing an issue as a duplicate of another, close it with the `duplicate`
43+
label:
44+
45+
```bash
46+
gh issue close <n> --repo navapbc/strata-documentation-engine --reason "not planned" \
47+
--comment "Duplicate of #<m>."
48+
gh issue edit <n> --repo navapbc/strata-documentation-engine --add-label duplicate
49+
```
50+
51+
### 2. Choose the template
2052

2153
Pick the template that matches the work. Templates live in `.github/ISSUE_TEMPLATE/`.
2254

@@ -32,7 +64,7 @@ Pick the template that matches the work. Templates live in `.github/ISSUE_TEMPLA
3264
If two seem to fit, prefer the less technical one for anything a non-engineer might file (`story`
3365
over `technical-task`, `bug` over `technical-task`).
3466

35-
### 2. Write in the right register
67+
### 3. Write in the right register
3668

3769
- **Product templates** (`epic`, `story`): plain, outcome-oriented language. Describe user value and
3870
what success looks like, not the implementation.
@@ -48,18 +80,18 @@ it is optional.
4880
Write the body one line per paragraph; do not hard-wrap it. See "Formatting issue and PR bodies" in
4981
`CONTRIBUTING.md` for why.
5082

51-
### 3. Apply the matching label
83+
### 4. Apply the matching label
5284

5385
Each template declares its label (`epic`, `story`, `bug`, `technical-task`, `spike`, `chore`). Apply
5486
that label when filing. If the label does not exist yet, create it first.
5587

56-
### 4. Review the draft
88+
### 5. Review the draft
5789

5890
Run the `review-draft` skill on the issue body before filing. It checks quality, template adherence,
5991
voice, punctuation (no em dashes), formatting (no hard-wrapped body), and house style. Apply the
6092
findings you agree with.
6193

62-
### 5. File
94+
### 6. File
6395

6496
Present the final draft for approval, then file it. Pass the body via a file so multi-line markdown
6597
survives the shell:

0 commit comments

Comments
 (0)