@jonit-dev/night-watch-cli 1.5.6 → 1.5.8
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/cli.js +12 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/cancel.d.ts.map +1 -1
- package/dist/commands/cancel.js +3 -0
- package/dist/commands/cancel.js.map +1 -1
- package/dist/commands/prds.d.ts.map +1 -1
- package/dist/commands/prds.js +6 -2
- package/dist/commands/prds.js.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +51 -0
- package/dist/server/index.js.map +1 -1
- package/dist/utils/status-data.d.ts.map +1 -1
- package/dist/utils/status-data.js +30 -4
- package/dist/utils/status-data.js.map +1 -1
- package/package.json +3 -1
- package/scripts/night-watch-cron.sh +64 -85
- package/scripts/night-watch-helpers.sh +32 -159
- package/scripts/night-watch-pr-reviewer-cron.sh +23 -53
- package/templates/night-watch-pr-reviewer.md +11 -6
- package/templates/night-watch.md +14 -9
- package/web/dist/assets/index-CP0r6Epl.js +350 -0
- package/web/dist/index.html +1 -15
- package/web/dist/assets/index-CmRcnnnG.js +0 -335
package/templates/night-watch.md
CHANGED
|
@@ -20,13 +20,14 @@ You are the Night Watch agent. Your job is to autonomously pick up PRD tickets a
|
|
|
20
20
|
|
|
21
21
|
b. **Branch naming**: The branch MUST be named exactly `night-watch/<prd-filename-without-.md>`. Do NOT use `feat/`, `feature/`, or any other prefix. Example: for `health-check-endpoints.md` the branch is `night-watch/health-check-endpoints`.
|
|
22
22
|
|
|
23
|
-
c. **
|
|
24
|
-
- You are already running in an isolated runtime workspace.
|
|
25
|
-
- The target branch `night-watch/<prd-filename-without-.md>` is already prepared.
|
|
26
|
-
- Do **not** run `git checkout`/`git switch` in the original project directory.
|
|
27
|
-
- Do **not** create/remove worktrees manually; the runtime controller handles isolation and cleanup.
|
|
23
|
+
c. **Create an isolated worktree + branch** from ${DEFAULT_BRANCH}:
|
|
28
24
|
|
|
29
|
-
|
|
25
|
+
```
|
|
26
|
+
git fetch origin ${DEFAULT_BRANCH}
|
|
27
|
+
git worktree add -b night-watch/<prd-filename-without-.md> ../${PROJECT_NAME}-nw-<prd-name> origin/${DEFAULT_BRANCH}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
d. `cd` into the worktree and run package install (npm install, yarn install, or pnpm install as appropriate). Keep all implementation steps inside this worktree.
|
|
30
31
|
|
|
31
32
|
e. **Implement the PRD using the PRD Executor workflow**:
|
|
32
33
|
- Read `.claude/commands/prd-executor.md` and follow its full execution pipeline.
|
|
@@ -57,9 +58,11 @@ You are the Night Watch agent. Your job is to autonomously pick up PRD tickets a
|
|
|
57
58
|
gh pr create --title "feat: <short title>" --body "<summary with PRD reference>"
|
|
58
59
|
```
|
|
59
60
|
|
|
60
|
-
j. **Move PRD to done
|
|
61
|
+
j. **Move PRD to done** (back in main repo on ${DEFAULT_BRANCH}):
|
|
61
62
|
|
|
62
63
|
```
|
|
64
|
+
cd ${PROJECT_DIR}
|
|
65
|
+
git checkout ${DEFAULT_BRANCH}
|
|
63
66
|
mkdir -p docs/PRDs/night-watch/done
|
|
64
67
|
mv docs/PRDs/night-watch/<file>.md docs/PRDs/night-watch/done/
|
|
65
68
|
```
|
|
@@ -82,8 +85,10 @@ You are the Night Watch agent. Your job is to autonomously pick up PRD tickets a
|
|
|
82
85
|
|
|
83
86
|
l. **Commit** the move + summary update, push ${DEFAULT_BRANCH}.
|
|
84
87
|
|
|
85
|
-
m. **
|
|
88
|
+
m. **Clean up worktree**: `git worktree remove ../${PROJECT_NAME}-nw-<prd-name>`
|
|
89
|
+
|
|
90
|
+
n. **STOP after this PRD**. Do NOT continue to the next PRD. One PRD per run prevents timeouts and reduces risk. The next cron trigger will pick up the next PRD.
|
|
86
91
|
|
|
87
|
-
5. **On failure**: Do NOT move the PRD to done. Log the failure in NIGHT-WATCH-SUMMARY.md with status "Failed" and the reason.
|
|
92
|
+
5. **On failure**: Do NOT move the PRD to done. Log the failure in NIGHT-WATCH-SUMMARY.md with status "Failed" and the reason. Clean up worktree and **stop** -- do not attempt the next PRD.
|
|
88
93
|
|
|
89
94
|
Start now. Scan for available PRDs and process the first eligible one.
|