next-issue 16.10.0 → 16.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/shared/prompts.mjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ISSUE_SECTIONS, numbered } from './issue-format.mjs';
|
|
2
2
|
import { fenceFor, paragraphs } from './text.mjs';
|
|
3
|
+
const README_RULE = 'Keep each README to what a user needs to start and use the tool. Put edge cases and internal behaviour in other docs.';
|
|
3
4
|
const ENGINEERING_RULES = [
|
|
4
5
|
'Update the documentation when you change behaviour or add or remove a feature.',
|
|
5
6
|
'Remove the tests of a feature or behaviour that you remove.',
|
|
6
7
|
'Test behaviour that a user can observe, not internals. Give each test a description that names the actor, the action and the observable outcome.',
|
|
7
8
|
'Reuse existing code and patterns, stay consistent with the repository and pick the simpler option.',
|
|
8
9
|
'Check an API, a command or a url in the repository or its dependencies before you use it. Do not invent one.',
|
|
10
|
+
README_RULE,
|
|
9
11
|
].join('\n');
|
|
10
12
|
const OTHER_RULES = 'The other rules of `CLAUDE.md`, such as code conventions and test style, still apply.';
|
|
11
13
|
const HARNESS_RULES = [
|
|
@@ -109,6 +111,7 @@ function reviewScope(earlier) {
|
|
|
109
111
|
'Check that the change updates the documentation when it changes behaviour or adds or removes a feature, and that it removes the tests of a removed feature or behaviour.',
|
|
110
112
|
'Check that each test checks behaviour that a user can observe, and that its description names the actor, the action and the observable outcome.',
|
|
111
113
|
'Check that the change reuses existing code and patterns, stays consistent with the repository and picks the simpler option, and that it uses no invented API, command or url.',
|
|
114
|
+
`Check that the change follows this rule: ${README_RULE}`,
|
|
112
115
|
'A missing documentation update or a test that is not observable is a finding.',
|
|
113
116
|
].join('\n')
|
|
114
117
|
: [
|
package/package.json
CHANGED
|
@@ -7,6 +7,8 @@ description: Investigate an issue that the next-issue worker handed over to a pe
|
|
|
7
7
|
|
|
8
8
|
Help the user understand why the worker handed an issue over, then answer the hand-over on GitHub. Do not fix the code of the issue yourself. The worker does the work.
|
|
9
9
|
|
|
10
|
+
Run any next-issue command as `npx -y next-issue@latest <command>`. Never run it from the `PATH`, a global install or a local build.
|
|
11
|
+
|
|
10
12
|
1. Find the repository, `<repo>`, that the worker reads. `<remote>` is the value of `remote` in `.next-issue/config.json` at the root of the repository. When there is no config file or no `remote` field, `<remote>` is `origin`. Run `git remote get-url <remote>` and take `<owner>/<name>` from the url, without `.git`. That is `<repo>`. When the host of the url is not `github.com`, `<repo>` is `<host>/<owner>/<name>`, so gh acts on that host. For an ssh url, such as `git@<host>:<owner>/<name>.git`, run `ssh -G <host>` and take the host from its `hostname` line, since `<host>` may be an alias from the ssh config. The host `ssh.github.com` means `github.com` (GitHub's ssh over port 443), so `<repo>` is then `<owner>/<name>`. Pass `--repo <repo>` to every `gh` command but `gh api`, since gh otherwise may pick another remote, such as `upstream`.
|
|
11
13
|
2. Find the labels. `<needs-human>` is the value of `labels.needsHuman` in `.next-issue/config.json`, or `status:needs-human` when it is not set or there is no config file. `<skip>` is the value of `labels.skip` in `.next-issue/config.json`, or `status:blocked` when it is not set or there is no config file. `<ready>` is the value of `labels.ready` in `.next-issue/config.json`, or `status:todo` when it is not set or there is no config file. When `labels.ready` is `""`, leave out `--add-label "<ready>"` below, since the worker then claims every open issue.
|
|
12
14
|
3. List the waiting issues:
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: create-issue
|
|
3
|
-
description: Turn a problem into a clear GitHub issue that the next-issue worker can claim. Use when the user wants to write, file or create an issue, or asks for a change to the code of a repository that has `.next-issue/config.json`.
|
|
3
|
+
description: Turn a problem into a clear GitHub issue that the next-issue worker can claim. Use when the user wants to write, file or create an issue, or asks for a change to the code of a repository that has `.next-issue/config.json`. In that case, file an issue with this skill instead of editing files.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Create an issue
|
|
7
7
|
|
|
8
8
|
Turn the problem of the user into one GitHub issue, or a split of linked issues when the change is too big for one commit, in the format of `template.md`, next to this file.
|
|
9
9
|
|
|
10
|
+
Run any next-issue command as `npx -y next-issue@latest <command>`. Never run it from the `PATH`, a global install or a local build.
|
|
11
|
+
|
|
10
12
|
1. Understand the problem. Restate it in your own words.
|
|
11
13
|
2. Find the repository, `<repo>`, that the worker reads. `<remote>` is the value of `remote` in `.next-issue/config.json` at the root of the repository. When there is no config file or no `remote` field, `<remote>` is `origin`. Run `git remote get-url <remote>` and take `<owner>/<name>` from the url, without `.git`. That is `<repo>`. When the host of the url is not `github.com`, `<repo>` is `<host>/<owner>/<name>`, so gh acts on that host. For an ssh url, such as `git@<host>:<owner>/<name>.git`, run `ssh -G <host>` and take the host from its `hostname` line, since `<host>` may be an alias from the ssh config. The host `ssh.github.com` means `github.com` (GitHub's ssh over port 443), so `<repo>` is then `<owner>/<name>`. Pass `--repo <repo>` to every `gh` command, since gh otherwise may pick another remote, such as `upstream`.
|
|
12
14
|
|