From 88b85e6bb85246952befc2686a003fd77662a764 Mon Sep 17 00:00:00 2001 From: Jon Harmon Date: Mon, 2 Mar 2026 07:36:33 -0600 Subject: [PATCH 1/4] Add skill to create github issues. --- .github/skills/create-issue/SKILL.md | 90 ++++++++++++++++++++++++++++ AGENTS.md | 3 +- 2 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 .github/skills/create-issue/SKILL.md diff --git a/.github/skills/create-issue/SKILL.md b/.github/skills/create-issue/SKILL.md new file mode 100644 index 0000000..94b643b --- /dev/null +++ b/.github/skills/create-issue/SKILL.md @@ -0,0 +1,90 @@ +--- +name: create-issue +description: Creates GitHub issues for the package repository. Use when asked to create, file, or open a GitHub issue, or when planning new features or functions that need to be tracked. +compatibility: Requires the `gh` CLI and an authenticated GitHub session. +--- + +# Create a GitHub issue + +Use `gh api graphql` with the `createIssue` mutation to create issues. This sets the issue type in a single step. Write the body to a temp file first, then pass it via `$(cat ...)`. + +## Issue type + +Choose the type that best fits the issue: + +| Type | ID | Use for | +|---|---|---| +| Feature | `IT_kwDODjbzj84BwJRW` | New exported functions or capabilities | +| Bug | `IT_kwDODjbzj84BwJRV` | Something broken or incorrect | +| Documentation | `IT_kwDODjbzj84BwprI` | Docs-only changes | +| Task | `IT_kwDODjbzj84BwJRU` | Maintenance, refactoring, chores | + +## Issue title + +Titles use conventional commit prefixes: + +- `feat: my_function()` — new exported function or feature +- `fix: short description` — bug fix +- `docs: short description` — documentation +- `chore: short description` — maintenance or task + +## Issue body structure + +Include these sections in order: + +### `## Summary` + +A single user story sentence (no other content in this section): + +```markdown +> As a [role], in order to [goal], I would like to [feature]. +``` + +Example: +```markdown +## Summary + +> As a data wrangler, in order to share information about my dataset, I would like to create a simple data dictionary based on my dataset. +``` + +### `## Proposed signature` + +The proposed R function signature, arguments table, and return value description: + +````markdown +## Proposed signature + +```r +function_name(arg1, arg2) +``` + +**Arguments** + +- `arg1` (`TYPE`) — Description. +- `arg2` (`TYPE`) — Description. + +**Returns** a `TYPE` with description. +```` + +### `## Behavior` + +Bullet points describing the expected behavior, edge cases, and any internal helpers that should be implemented as part of this issue. + +### `## References` (optional) + +Only include this section when there are specific reference implementations, external URLs, or related code to link to. Omit it entirely when there are none. + +## Creating the issue + +```bash +gh api graphql \ + -f query='mutation($repoId:ID!, $title:String!, $body:String!, $typeId:ID!) { + createIssue(input:{repositoryId:$repoId, title:$title, body:$body, issueTypeId:$typeId}) { + issue { url } + } + }' \ + -f repoId="R_kgDORb_Ktg" \ + -f title="feat: my_function()" \ + -f body="$(cat /tmp/issue_body.md)" \ + -f typeId="IT_kwDODjbzj84BwJRW" +``` diff --git a/AGENTS.md b/AGENTS.md index 67c03a4..3760f6a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,7 +12,7 @@ | `R/datawrap-package.R` | Auto-generated package-level documentation; do not edit | | `tests/testthat/` | Test suite; mirrors `R/` structure | | `man/` | Generated Rd files; do not edit manually | -| `.github/skills/` | Agent skill files (document, search-code) | +| `.github/skills/` | Agent skill files | | `DESCRIPTION` | Package metadata and dependencies | | `NAMESPACE` | Exports; auto-generated by `devtools::document()` | @@ -59,6 +59,7 @@ Skills in @.github/skills should be loaded when the user triggers them. ------------------------|------------------------------------------------| | document functions | @.github/skills/document/SKILL.md | | search / rewrite code | @.github/skills/search-code/SKILL.md | +| create github issues | @.github/skills/create-issue/SKILL.md | ## File Organization From db02f55a815fd2c75b5063ce23913d57d56e080c Mon Sep 17 00:00:00 2001 From: Jon Harmon Date: Mon, 2 Mar 2026 08:34:52 -0600 Subject: [PATCH 2/4] Remove test placeholder. --- tests/testthat/test-placeholder.R | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 tests/testthat/test-placeholder.R diff --git a/tests/testthat/test-placeholder.R b/tests/testthat/test-placeholder.R deleted file mode 100644 index 5c00b00..0000000 --- a/tests/testthat/test-placeholder.R +++ /dev/null @@ -1,3 +0,0 @@ -test_that("Delete this when there's a real test", { - succeed("Placeholder") -}) From 7a017ab568dcad17bed36e72875e373f680829c4 Mon Sep 17 00:00:00 2001 From: Jon Harmon Date: Mon, 2 Mar 2026 09:05:42 -0600 Subject: [PATCH 3/4] docs: pliable IDs in create-issue skill --- .github/skills/create-issue/SKILL.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/skills/create-issue/SKILL.md b/.github/skills/create-issue/SKILL.md index 94b643b..a7af1ce 100644 --- a/.github/skills/create-issue/SKILL.md +++ b/.github/skills/create-issue/SKILL.md @@ -8,6 +8,18 @@ compatibility: Requires the `gh` CLI and an authenticated GitHub session. Use `gh api graphql` with the `createIssue` mutation to create issues. This sets the issue type in a single step. Write the body to a temp file first, then pass it via `$(cat ...)`. +## Looking up IDs + +The hardcoded IDs below are correct for this repo as of 2026-03-02. If they ever change, or if you're working in a fork or a repo other than "wranglezone/datawrap", re-run these queries to get fresh values (updating owner and name if necessary). + +```bash +# Repository node ID +gh api graphql -f query='{ repository(owner: "wranglezone", name: "datawrap") { id } }' + +# Available issue type IDs +gh api graphql -f query='{ repository(owner: "wranglezone", name: "datawrap") { issueTypes(first: 20) { nodes { id name } } } }' +``` + ## Issue type Choose the type that best fits the issue: From 43a14f9f86cb9392126fe65ff6f664ee3788aabd Mon Sep 17 00:00:00 2001 From: Jon Harmon Date: Mon, 2 Mar 2026 09:11:22 -0600 Subject: [PATCH 4/4] docs: more issue type info in create-issue skill --- .github/skills/create-issue/SKILL.md | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/skills/create-issue/SKILL.md b/.github/skills/create-issue/SKILL.md index a7af1ce..ab9ce09 100644 --- a/.github/skills/create-issue/SKILL.md +++ b/.github/skills/create-issue/SKILL.md @@ -42,9 +42,17 @@ Titles use conventional commit prefixes: ## Issue body structure -Include these sections in order: +Which sections to include depends on the issue type: -### `## Summary` +| Section | Feature | Bug | Documentation | Task | +|---|---|---|---|---| +| `## Summary` | ✓ | ✓ | ✓ | ✓ | +| `## Details` | optional | optional | optional | optional | +| `## Proposed signature` | ✓ | — | — | — | +| `## Behavior` | ✓ | ✓ | — | — | +| `## References` | optional | optional | optional | optional | + +### `## Summary` (all types) A single user story sentence (no other content in this section): @@ -53,13 +61,18 @@ A single user story sentence (no other content in this section): ``` Example: + ```markdown ## Summary > As a data wrangler, in order to share information about my dataset, I would like to create a simple data dictionary based on my dataset. ``` -### `## Proposed signature` +### `## Details` (optional, all types) + +For information that's important to capture but doesn't fit naturally into any other section. Use sparingly — if the content belongs in `## Behavior`, `## Proposed signature`, or `## References`, put it there instead. + +### `## Proposed signature` (Feature only) The proposed R function signature, arguments table, and return value description: @@ -78,13 +91,14 @@ function_name(arg1, arg2) **Returns** a `TYPE` with description. ```` -### `## Behavior` +### `## Behavior` (Feature and Bug) -Bullet points describing the expected behavior, edge cases, and any internal helpers that should be implemented as part of this issue. +- **Feature**: bullet points describing expected behavior, edge cases, and any internal helpers to implement as part of this issue. +- **Bug**: describe the current (broken) behavior, the expected behavior, and steps to reproduce if known. -### `## References` (optional) +### `## References` (optional, all types) -Only include this section when there are specific reference implementations, external URLs, or related code to link to. Omit it entirely when there are none. +Only include when there are specific reference implementations, external URLs, or related code to link to. Omit it entirely when there are none. ## Creating the issue