@ravshansbox/pi-next-issue 2.15.0 → 2.17.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/README.md CHANGED
@@ -22,7 +22,7 @@ The footer shows each running issue with its stage, the number of tool calls and
22
22
 
23
23
  When an issue waits for a person, with the `needsHuman` label of the [config](../next-issue/README.md), the footer shows the count, for example `2 questions waiting`, and a note appears once for each new question. Neither interrupts what you do. Pi asks the worker for the list when it connects and every minute, and the worker also sends it after each issue of a run. A question answered on GitHub or in another pi leaves the count with the next list.
24
24
 
25
- Run `/next-issue answer` to go through the waiting questions one at a time. Each shows the issue, the title and the reason of the hand-over. Choose:
25
+ Run `/next-issue answer` to go through the waiting questions one at a time. Pi suggests `answer` as you type after `/next-issue `. Each shows the issue, the title and the reason of the hand-over. Choose:
26
26
 
27
27
  - **Retry**: takes the `needsHuman` label off the issue and its pull request, so the next run resumes it.
28
28
  - **Retry with guidance**: asks for text, posts it as a comment where the worker reads it, on the pull request of the issue or on the issue when it has none, then takes the `needsHuman` label off.
@@ -36,11 +36,13 @@ The package ships the `create-issue` skill. Ask pi to write an issue, or run `/s
36
36
 
37
37
  1. restates the problem, reads the code when the problem touches it, and finds the open issues that must be done first;
38
38
  2. asks numbered questions until none is open;
39
- 3. shows the title, the body and those blockers, and asks once whether to create the issue and start a run;
40
- 4. runs `gh issue create --body-file` with the body from [`template.md`](skills/create-issue/template.md) and the `status:todo` label;
41
- 5. links each blocker with `gh issue edit --add-blocked-by`, so the worker waits for it;
39
+ 3. runs `gh issue create --body-file` with the body from [`template.md`](skills/create-issue/template.md) and the `status:todo` label, without showing the body first;
40
+ 4. links each blocker with `gh issue edit --add-blocked-by`, so the worker waits for it;
41
+ 5. gives you the issue url and asks once whether to start a run, leave it or change it, and changes it with `gh issue edit --body-file` or `--title` until you start a run or leave it;
42
42
  6. calls `next_issue_start` when you asked for a run.
43
43
 
44
+ The issue gets `status:todo` when it is created, so a run that is already going may claim it before you review it.
45
+
44
46
  Pi does not implement the issue in that session. The worker does the work. The body holds the sections of the [issue format](../next-issue/README.md#issue-format).
45
47
 
46
48
  ## Worker
@@ -53,4 +55,4 @@ The extension does no work itself. On `/next-issue` or `next_issue_start` it con
53
55
  - The worker stays when every pi is closed. Stop it with `npx next-issue stop`.
54
56
  - When the extension is newer than the worker, the worker closes once no run is going, and the extension starts the newer worker.
55
57
 
56
- Each run asks the worker to merge the pull requests. See the [`next-issue` README](../next-issue/README.md) for what a run does, its labels, its state and its config.
58
+ Each run asks the worker to merge the pull requests. [ADR 0002](https://github.com/ravshansbox/next-issue/blob/main/docs/adr/0002-merge-setting.md) compares where the merge setting could live. See the [`next-issue` README](../next-issue/README.md) for what a run does, its labels, its state and its config.
package/index.ts CHANGED
@@ -445,6 +445,8 @@ export function createExtension(options: Options) {
445
445
  pi.registerCommand('next-issue', {
446
446
  description:
447
447
  'Start or stop working through the GitHub issues of this repository, or answer the waiting questions with "answer"',
448
+ getArgumentCompletions: (prefix) =>
449
+ 'answer'.startsWith(prefix) ? [{ value: 'answer', label: 'answer' }] : null,
448
450
  handler: async (args, ctx) => {
449
451
  if (args.trim() === 'answer') {
450
452
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ravshansbox/pi-next-issue",
3
- "version": "2.15.0",
3
+ "version": "2.17.0",
4
4
  "description": "Pi extension that works through GitHub issues with the next-issue worker",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -11,23 +11,34 @@ Turn the problem of the user into one GitHub issue in the format of `template.md
11
11
  2. Investigate the code when the problem touches it. Read the relevant files and note what you find, with file paths. Run `gh issue list` and note each open issue that must be done first, including the issues you create in the same session.
12
12
  3. Ask numbered questions about anything that is unclear: the scope, the expected behaviour, the acceptance criteria. Label options with letters and recommend one. Ask again until no question is open.
13
13
  4. Write the body from `template.md` into a temporary file. Keep every heading of the template and its order. Leave `Open questions` empty.
14
- 5. Show the title, the body and the blockers to the user. Ask once whether to create the issue and start a run: a) create the issue and start a run, b) create the issue only, c) change the draft. Change the draft and show it again until the user picks a or b.
15
- 6. Only after the user picks a or b, create the issue:
14
+ 5. Create the issue without showing the body first:
16
15
 
17
16
  ```bash
18
17
  gh issue create --title "<title>" --body-file <file> --label status:todo
19
18
  ```
20
19
 
21
- 7. Link each blocker:
20
+ 6. Link each blocker:
22
21
 
23
22
  ```bash
24
23
  gh issue edit <number> --add-blocked-by <blocker>
25
24
  ```
26
25
 
27
- 8. Tell the user the issue url.
28
- 9. Only when the user picked a, call the `next_issue_start` tool, and tell the user what it reports.
26
+ 7. Give the user the issue url. Ask once: a) start a run, b) leave it, c) change the issue.
27
+ 8. When the user picks c, make the change on GitHub and ask again. Write the new body into the temporary file and run:
29
28
 
30
- Once the issue exists, do not implement it in this session. The next-issue worker does the work. Do not ask about a run a second time.
29
+ ```bash
30
+ gh issue edit <number> --body-file <file>
31
+ ```
32
+
33
+ To change the title, run:
34
+
35
+ ```bash
36
+ gh issue edit <number> --title "<title>"
37
+ ```
38
+
39
+ 9. Only when the user picks a, call the `next_issue_start` tool, and tell the user what it reports.
40
+
41
+ Once the issue exists, do not implement it in this session. The next-issue worker does the work. Once the user picks a or b, do not ask about a run again.
31
42
 
32
43
  ## Sections
33
44