@jonit-dev/night-watch-cli 1.8.6-beta.2 → 1.8.6-beta.3
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.
|
@@ -416,15 +416,16 @@ Read ${EXECUTOR_PROMPT_REF} and follow the FULL execution pipeline:
|
|
|
416
416
|
3. Create a task list with one task per phase
|
|
417
417
|
4. Execute phases in parallel waves using agent swarms — launch ALL independent phases concurrently
|
|
418
418
|
5. Run the project's verify/test command between waves to catch issues early
|
|
419
|
-
6. After all phases complete, run final verification and fix any issues
|
|
420
419
|
Follow all CLAUDE.md conventions (if present).
|
|
421
420
|
|
|
422
|
-
## Finalize
|
|
423
|
-
- Commit all changes, push, and open
|
|
421
|
+
## Finalize — open the PR FIRST, then verify
|
|
422
|
+
- Commit all changes, push, and open the PR immediately:
|
|
424
423
|
git push -u origin ${BRANCH_NAME}
|
|
425
424
|
gh pr create --title \"feat: <short title>\" --body \"Closes #${ISSUE_NUMBER}
|
|
426
425
|
|
|
427
426
|
<summary>\"
|
|
427
|
+
- After the PR is open, run final verification (lint, typecheck, tests). If anything fails, fix it, commit, and push again.
|
|
428
|
+
- STOP immediately after the final push — do NOT do any additional work, visual checks, or exploration.
|
|
428
429
|
- Do NOT process any other issues — only issue #${ISSUE_NUMBER}"
|
|
429
430
|
else
|
|
430
431
|
PROMPT_PRD_PATH="${PRD_DIR_REL}/${ELIGIBLE_PRD}"
|
|
@@ -444,13 +445,14 @@ Read ${EXECUTOR_PROMPT_REF} and follow the FULL execution pipeline:
|
|
|
444
445
|
3. Create a task list with one task per phase
|
|
445
446
|
4. Execute phases in parallel waves using agent swarms — launch ALL independent phases concurrently
|
|
446
447
|
5. Run the project's verify/test command between waves to catch issues early
|
|
447
|
-
6. After all phases complete, run final verification and fix any issues
|
|
448
448
|
Follow all CLAUDE.md conventions (if present).
|
|
449
449
|
|
|
450
|
-
## Finalize
|
|
451
|
-
- Commit all changes, push, and open
|
|
450
|
+
## Finalize — open the PR FIRST, then verify
|
|
451
|
+
- Commit all changes, push, and open the PR immediately:
|
|
452
452
|
git push -u origin ${BRANCH_NAME}
|
|
453
453
|
gh pr create --title \"feat: <short title>\" --body \"<summary referencing PRD>\"
|
|
454
|
+
- After the PR is open, run final verification (lint, typecheck, tests). If anything fails, fix it, commit, and push again.
|
|
455
|
+
- STOP immediately after the final push — do NOT do any additional work, visual checks, or exploration.
|
|
454
456
|
- Do NOT move the PRD to done/ — the cron script handles that
|
|
455
457
|
- Do NOT process any other PRDs — only ${ELIGIBLE_PRD}"
|
|
456
458
|
fi
|
|
@@ -597,12 +599,14 @@ The previous session ran out of context window. Progress has been committed on b
|
|
|
597
599
|
Read ${EXECUTOR_PROMPT_REF} and follow the FULL execution pipeline for remaining phases only.
|
|
598
600
|
Follow all CLAUDE.md conventions (if present).
|
|
599
601
|
|
|
600
|
-
## Finalize
|
|
601
|
-
- Commit all changes, push, and open
|
|
602
|
+
## Finalize — open the PR FIRST, then verify
|
|
603
|
+
- Commit all changes, push, and open the PR immediately:
|
|
602
604
|
git push -u origin ${BRANCH_NAME}
|
|
603
605
|
gh pr create --title \"feat: <short title>\" --body \"Closes #${ISSUE_NUMBER}
|
|
604
606
|
|
|
605
607
|
<summary>\"
|
|
608
|
+
- After the PR is open, run final verification (lint, typecheck, tests). If anything fails, fix it, commit, and push again.
|
|
609
|
+
- STOP immediately after the final push — do NOT do any additional work, visual checks, or exploration.
|
|
606
610
|
- Do NOT process any other issues — only issue #${ISSUE_NUMBER}"
|
|
607
611
|
else
|
|
608
612
|
PROMPT="Continue implementing the PRD at ${PRD_DIR_REL}/${ELIGIBLE_PRD}
|
|
@@ -625,10 +629,12 @@ The previous session ran out of context window. Progress has been committed on b
|
|
|
625
629
|
Read ${EXECUTOR_PROMPT_REF} and follow the FULL execution pipeline for remaining phases only.
|
|
626
630
|
Follow all CLAUDE.md conventions (if present).
|
|
627
631
|
|
|
628
|
-
## Finalize
|
|
629
|
-
- Commit all changes, push, and open
|
|
632
|
+
## Finalize — open the PR FIRST, then verify
|
|
633
|
+
- Commit all changes, push, and open the PR immediately:
|
|
630
634
|
git push -u origin ${BRANCH_NAME}
|
|
631
635
|
gh pr create --title \"feat: <short title>\" --body \"<summary referencing PRD>\"
|
|
636
|
+
- After the PR is open, run final verification (lint, typecheck, tests). If anything fails, fix it, commit, and push again.
|
|
637
|
+
- STOP immediately after the final push — do NOT do any additional work, visual checks, or exploration.
|
|
632
638
|
- Do NOT move the PRD to done/ — the cron script handles that
|
|
633
639
|
- Do NOT process any other PRDs — only ${ELIGIBLE_PRD}"
|
|
634
640
|
fi
|
|
@@ -306,7 +306,12 @@ log() {
|
|
|
306
306
|
fi
|
|
307
307
|
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] [PID:$$]${elapsed_str} $*"
|
|
308
308
|
echo "${msg}" >> "${log_file}"
|
|
309
|
-
|
|
309
|
+
# When invoked via cron, stdout/stderr are already redirected to the log file
|
|
310
|
+
# by the crontab entry (>> executor.log 2>&1), so echoing to stderr would
|
|
311
|
+
# duplicate every log line in the file.
|
|
312
|
+
if [ "${NW_CRON_TRIGGER:-0}" != "1" ]; then
|
|
313
|
+
echo "${msg}" >&2
|
|
314
|
+
fi
|
|
310
315
|
}
|
|
311
316
|
|
|
312
317
|
# Write a visual separator line to the log to delimit separate runs.
|
|
@@ -38,9 +38,7 @@ You are the Night Watch agent. Your job is to autonomously pick up PRD tickets a
|
|
|
38
38
|
|
|
39
39
|
f. **Write tests** as specified in each PRD phase (the prd-executor agents handle this per-phase).
|
|
40
40
|
|
|
41
|
-
g. **
|
|
42
|
-
|
|
43
|
-
h. **Commit** all changes:
|
|
41
|
+
g. **Commit** all changes:
|
|
44
42
|
|
|
45
43
|
```
|
|
46
44
|
git add <files>
|
|
@@ -51,16 +49,18 @@ You are the Night Watch agent. Your job is to autonomously pick up PRD tickets a
|
|
|
51
49
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>"
|
|
52
50
|
```
|
|
53
51
|
|
|
54
|
-
|
|
52
|
+
h. **Push and open PR** — do this BEFORE running final verification:
|
|
55
53
|
|
|
56
54
|
```
|
|
57
55
|
git push -u origin night-watch/<prd-name>
|
|
58
56
|
gh pr create --title "feat: <short title>" --body "<summary with PRD reference>"
|
|
59
57
|
```
|
|
60
58
|
|
|
59
|
+
i. **Post-PR verification**: Now run the project's test/lint commands (e.g., `npm test`, `npm run lint`, `npm run verify` or equivalent). If anything fails, fix it, commit, and push again.
|
|
60
|
+
|
|
61
61
|
j. **Mark PRD as done**: `night-watch prd done <filename>`
|
|
62
62
|
|
|
63
|
-
k. **STOP
|
|
63
|
+
k. **STOP immediately**. Do NOT continue to the next PRD, and do NOT do any additional work, visual checks, or exploration. One PRD per run prevents timeouts and reduces risk. The next cron trigger will pick up the next PRD.
|
|
64
64
|
|
|
65
65
|
5. **On failure**: Do NOT mark the PRD as done. Log the failure and clean up worktree. **Stop** -- do not attempt the next PRD.
|
|
66
66
|
|
|
@@ -13,19 +13,21 @@ If `NW_BOARD_ENABLED` is set to `true` in the environment, use board mode instea
|
|
|
13
13
|
|
|
14
14
|
4. **Branch naming**: `night-watch/<issue-number>-<slugified-title>` (e.g., `night-watch/42-my-feature`)
|
|
15
15
|
|
|
16
|
-
5. **Create worktree and implement** as normal (create branch, worktree, implement,
|
|
16
|
+
5. **Create worktree and implement** as normal (create branch, worktree, implement, write tests, commit).
|
|
17
17
|
|
|
18
|
-
6. **Open PR
|
|
18
|
+
6. **Open PR immediately** — do this BEFORE running final verification. Include `Closes #<issue-number>` in the PR body so the issue auto-closes when merged:
|
|
19
19
|
|
|
20
20
|
```
|
|
21
21
|
gh pr create --title "feat: <short title>" --body "Closes #<number>\n\n<summary>"
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
7. **
|
|
24
|
+
7. **Post-PR verification**: Run final verification (lint, typecheck, tests). If anything fails, fix it, commit, and push again.
|
|
25
25
|
|
|
26
|
-
8. **
|
|
26
|
+
8. **Move to Review**: `night-watch board move-issue <number> --column "Review"`
|
|
27
27
|
|
|
28
|
-
9. **
|
|
28
|
+
9. **Comment on issue**: `night-watch board comment <number> --body "PR opened: <url>"`
|
|
29
|
+
|
|
30
|
+
10. **STOP immediately** — do NOT do any additional work, visual checks, or exploration. One task per run.
|
|
29
31
|
|
|
30
32
|
---
|
|
31
33
|
|
|
@@ -69,9 +71,7 @@ If `NW_BOARD_ENABLED` is set to `true` in the environment, use board mode instea
|
|
|
69
71
|
|
|
70
72
|
f. **Write tests** as specified in each PRD phase (the prd-executor agents handle this per-phase).
|
|
71
73
|
|
|
72
|
-
g. **
|
|
73
|
-
|
|
74
|
-
h. **Commit** all changes:
|
|
74
|
+
g. **Commit** all changes:
|
|
75
75
|
|
|
76
76
|
```
|
|
77
77
|
git add <files>
|
|
@@ -82,16 +82,18 @@ If `NW_BOARD_ENABLED` is set to `true` in the environment, use board mode instea
|
|
|
82
82
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>"
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
h. **Push and open PR** — do this BEFORE running final verification:
|
|
86
86
|
|
|
87
87
|
```
|
|
88
88
|
git push -u origin night-watch/<prd-name>
|
|
89
89
|
gh pr create --title "feat: <short title>" --body "<summary with PRD reference>"
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
+
i. **Post-PR verification**: Now run the project's test/lint commands (e.g., `npm test`, `npm run lint`, `npm run verify` or equivalent). If anything fails, fix it, commit, and push again.
|
|
93
|
+
|
|
92
94
|
j. **Mark PRD as done**: `night-watch prd done <filename>`
|
|
93
95
|
|
|
94
|
-
k. **STOP
|
|
96
|
+
k. **STOP immediately**. Do NOT continue to the next PRD, and do NOT do any additional work, visual checks, or exploration. One PRD per run prevents timeouts and reduces risk. The next cron trigger will pick up the next PRD.
|
|
95
97
|
|
|
96
98
|
5. **On failure**: Do NOT mark the PRD as done. Log the failure and clean up worktree. **Stop** -- do not attempt the next PRD.
|
|
97
99
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jonit-dev/night-watch-cli",
|
|
3
|
-
"version": "1.8.6-beta.
|
|
3
|
+
"version": "1.8.6-beta.3",
|
|
4
4
|
"description": "AI agent that implements your specs, opens PRs, and reviews code overnight. Queue GitHub issues or PRDs, wake up to pull requests.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|