@jonit-dev/night-watch-cli 1.8.12-beta.1 → 1.8.12-beta.11
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 +3729 -2027
- package/dist/cli.js.map +1 -1
- package/dist/commands/agent.d.ts +12 -0
- package/dist/commands/agent.d.ts.map +1 -0
- package/dist/commands/agent.js +307 -0
- package/dist/commands/agent.js.map +1 -0
- package/dist/commands/analytics.d.ts.map +1 -1
- package/dist/commands/analytics.js +60 -0
- package/dist/commands/analytics.js.map +1 -1
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +45 -0
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +13 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/merge.d.ts.map +1 -1
- package/dist/commands/merge.js +30 -3
- package/dist/commands/merge.js.map +1 -1
- package/dist/commands/plan.d.ts.map +1 -1
- package/dist/commands/plan.js +45 -0
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/qa.d.ts.map +1 -1
- package/dist/commands/qa.js +24 -0
- package/dist/commands/qa.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +20 -0
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/resolve.d.ts.map +1 -1
- package/dist/commands/resolve.js +26 -0
- package/dist/commands/resolve.js.map +1 -1
- package/dist/commands/review.d.ts +2 -0
- package/dist/commands/review.d.ts.map +1 -1
- package/dist/commands/review.js +46 -1
- package/dist/commands/review.js.map +1 -1
- package/dist/commands/run.d.ts +16 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +85 -1
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/shared/env-builder.d.ts.map +1 -1
- package/dist/commands/shared/env-builder.js +1 -0
- package/dist/commands/shared/env-builder.js.map +1 -1
- package/dist/commands/shared/feedback.d.ts +24 -0
- package/dist/commands/shared/feedback.d.ts.map +1 -0
- package/dist/commands/shared/feedback.js +38 -0
- package/dist/commands/shared/feedback.js.map +1 -0
- package/dist/commands/slice.d.ts.map +1 -1
- package/dist/commands/slice.js +48 -1
- package/dist/commands/slice.js.map +1 -1
- package/dist/scripts/night-watch-audit-cron.sh +1 -0
- package/dist/scripts/night-watch-cron.sh +186 -23
- package/dist/scripts/night-watch-helpers.sh +65 -2
- package/dist/scripts/night-watch-merger-cron.sh +210 -36
- package/dist/scripts/night-watch-plan-cron.sh +2 -0
- package/dist/scripts/night-watch-pr-resolver-cron.sh +6 -0
- package/dist/scripts/night-watch-pr-reviewer-cron.sh +96 -5
- package/dist/scripts/night-watch-qa-cron.sh +8 -1
- package/dist/scripts/night-watch-slicer-cron.sh +3 -0
- package/dist/templates/night-watch-pr-reviewer.md +7 -6
- package/dist/templates/night-watch.config.json +21 -0
- package/dist/templates/pr-reviewer.md +7 -6
- package/dist/templates/slicer.md +3 -0
- package/dist/web/assets/index-B6E6kOoR.js +406 -0
- package/dist/web/assets/index-C-xpWpS8.css +1 -0
- package/dist/web/assets/index-CEYe-290.js +412 -0
- package/dist/web/assets/index-DIMUXIP8.css +1 -0
- package/dist/web/assets/index-DpvzoXEv.js +442 -0
- package/dist/web/assets/index-DyME41HV.css +1 -0
- package/dist/web/assets/index-NR27JE3b.js +406 -0
- package/dist/web/index.html +2 -2
- package/package.json +3 -1
|
@@ -55,6 +55,27 @@
|
|
|
55
55
|
"audit": 10
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
+
"webhookTriggers": {
|
|
59
|
+
"enabled": false,
|
|
60
|
+
"secretEnv": "NIGHT_WATCH_WEBHOOK_SECRET",
|
|
61
|
+
"allowedJobIds": [
|
|
62
|
+
"executor",
|
|
63
|
+
"reviewer",
|
|
64
|
+
"pr-resolver",
|
|
65
|
+
"slicer",
|
|
66
|
+
"qa",
|
|
67
|
+
"audit",
|
|
68
|
+
"analytics",
|
|
69
|
+
"merger"
|
|
70
|
+
],
|
|
71
|
+
"requireTimestamp": false,
|
|
72
|
+
"maxSkewSeconds": 300,
|
|
73
|
+
"github": {
|
|
74
|
+
"enabled": false,
|
|
75
|
+
"events": [],
|
|
76
|
+
"rules": []
|
|
77
|
+
}
|
|
78
|
+
},
|
|
58
79
|
"jobProviders": {},
|
|
59
80
|
"autoMerge": false,
|
|
60
81
|
"autoMergeMethod": "squash",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
You are the Night Watch PR Reviewer agent. Your job is to check open PRs for three things:
|
|
2
2
|
|
|
3
3
|
1. Merge conflicts -- rebase onto the base branch and resolve them.
|
|
4
|
-
2. Review comments with a score below 80 -- address the feedback.
|
|
4
|
+
2. Review comments with a score below 80 or unresolved review feedback -- address the feedback.
|
|
5
5
|
3. Failed CI jobs -- diagnose and fix the failures.
|
|
6
6
|
|
|
7
7
|
## Context
|
|
@@ -10,7 +10,7 @@ The repo can have multiple PR checks/workflows (project CI plus Night Watch auto
|
|
|
10
10
|
Common examples include `typecheck`, `lint`, `test`, `build`, `verify`, `executor`, `qa`, and `audit`.
|
|
11
11
|
Treat `gh pr checks <number> --json name,state,conclusion` as the source of truth for which checks failed.
|
|
12
12
|
|
|
13
|
-
A PR needs attention if **any** of the following: merge conflicts present, review score below 80, or any CI job failed.
|
|
13
|
+
A PR needs attention if **any** of the following: merge conflicts present, no review score yet, review score below 80, unresolved review feedback, or any CI job failed.
|
|
14
14
|
|
|
15
15
|
## PRD Context
|
|
16
16
|
|
|
@@ -21,7 +21,7 @@ If current PR code or review feedback conflicts with the PRD context, call out t
|
|
|
21
21
|
## Important: Early Exit
|
|
22
22
|
|
|
23
23
|
- If there are **no open PRs** on `night-watch/` or `feat/` branches, **stop immediately** and report "No PRs to review."
|
|
24
|
-
- If all open PRs have **no merge conflicts**, **passing CI**,
|
|
24
|
+
- If all open PRs have **no merge conflicts**, **passing CI**, **review score >= 80**, and **no unresolved review feedback**, **stop immediately** and report "All PRs are in good shape."
|
|
25
25
|
- If a PR has no review score yet, it needs a first review — do NOT skip it.
|
|
26
26
|
- Do **NOT** loop or retry. Process each PR **once** per run. After processing all PRs, stop.
|
|
27
27
|
- Do **NOT** re-check PRs after pushing fixes -- the CI will re-run automatically on the next push.
|
|
@@ -90,8 +90,8 @@ Parse the review score from the comment body. Look for patterns like:
|
|
|
90
90
|
Extract the numeric score. If multiple comments have scores, use the **most recent** one.
|
|
91
91
|
|
|
92
92
|
3. **Determine if PR needs work**:
|
|
93
|
-
- If no merge conflicts **AND** score >= 80 **AND** all CI checks pass --> skip this PR.
|
|
94
|
-
- If merge conflicts present **OR** score < 80 **OR** any CI check failed --> fix the issues.
|
|
93
|
+
- If no merge conflicts **AND** score >= 80 **AND** no unresolved review feedback **AND** all CI checks pass --> skip this PR.
|
|
94
|
+
- If merge conflicts present **OR** score < 80 **OR** unresolved review feedback exists **OR** any CI check failed --> fix the issues.
|
|
95
95
|
|
|
96
96
|
4. **Fix the PR**:
|
|
97
97
|
|
|
@@ -122,8 +122,9 @@ Parse the review score from the comment body. Look for patterns like:
|
|
|
122
122
|
- Push the clean branch: `git push --force-with-lease origin <branch-name>`
|
|
123
123
|
- **Do NOT leave any conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`) in any file.**
|
|
124
124
|
|
|
125
|
-
c. **Address review feedback** (if score < 80):
|
|
125
|
+
c. **Address review feedback** (if score < 80 or pending review feedback exists):
|
|
126
126
|
- Read the review comments carefully. Extract areas for improvement, bugs found, issues found, and specific file/line suggestions.
|
|
127
|
+
- If `pending review feedback` is greater than 0 in the cron-provided preflight data, inspect review conversations with `gh pr view <number> --comments` and the GitHub PR review UI/API as needed.
|
|
127
128
|
- For each review suggestion:
|
|
128
129
|
- If you agree, implement the change.
|
|
129
130
|
- If you do not agree, do not implement it blindly. Capture a short technical reason and include that reason in the PR comment.
|
package/dist/templates/slicer.md
CHANGED
|
@@ -32,6 +32,8 @@ The PRD directory is: `{{PRD_DIR}}`
|
|
|
32
32
|
|
|
33
33
|
3. **Write a Complete PRD** — Follow the exact template structure below. Every section must be filled with concrete information. No placeholder text.
|
|
34
34
|
|
|
35
|
+
The PRD MUST include these sections: Context (with Problem, Files Analyzed, Current Behavior, Integration Points), Solution (with Approach, Key Decisions), Execution Phases (with Files, Implementation steps, Tests), and Acceptance Criteria.
|
|
36
|
+
|
|
35
37
|
4. **Write the PRD File** — Use the Write tool to create the PRD file at `{{OUTPUT_FILE_PATH}}`.
|
|
36
38
|
|
|
37
39
|
---
|
|
@@ -146,6 +148,7 @@ sequenceDiagram
|
|
|
146
148
|
## 4. Execution Phases
|
|
147
149
|
|
|
148
150
|
Critical rules:
|
|
151
|
+
|
|
149
152
|
1. Each phase = ONE user-testable vertical slice
|
|
150
153
|
2. Max 5 files per phase (split if larger)
|
|
151
154
|
3. Each phase MUST include concrete tests
|