@mechanai/deepreview 2.2.1 → 2.2.2
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.
|
@@ -18,13 +18,16 @@ Set ITERATION=1
|
|
|
18
18
|
Set PRIOR_CONTEXT="" (empty — built up across iterations; holds both design context and prior findings)
|
|
19
19
|
Set ALL_SESSION_DIRS=[] (list of all session directories used, in order)
|
|
20
20
|
|
|
21
|
+
Determine REPO_ROOT — the main repository root (not a worktree root). Run:
|
|
22
|
+
`REPO_ROOT=$(realpath "$(git rev-parse --git-common-dir)" | sed 's|/\.git$||')`
|
|
23
|
+
|
|
21
24
|
If CONTEXT_FILE exists, read its contents and set PRIOR_CONTEXT to:
|
|
22
25
|
"## Design Decisions (intentional — do not flag)\nThe following are deliberate design choices. Do NOT flag these as issues or suggest alternatives.\n`\n" + contents of CONTEXT_FILE + "\n`\n"
|
|
23
26
|
|
|
24
27
|
STEP 2: RUN INITIAL DEEPREVIEW (full pipeline with cross-validation)
|
|
25
28
|
Run the full deepreview pipeline (Stages 1-5 from the deepreview command):
|
|
26
29
|
|
|
27
|
-
- Determine SESSION_DIR and write input.txt
|
|
30
|
+
- Determine SESSION_DIR=`$REPO_ROOT/.ai/deepreview/loop-iter$ITERATION-$(date +%Y-%m-%d-%H%M%S)` and write input.txt
|
|
28
31
|
- Append SESSION_DIR to ALL_SESSION_DIRS
|
|
29
32
|
- Stage 1: 5 parallel reviewers — prepend PRIOR_CONTEXT (if non-empty) to each reviewer's prompt as "${PRIOR_CONTEXT}You are reviewing ... Read the content at $SESSION_DIR/input.txt. Write your review to $SESSION_DIR/review-{perspective}.md."
|
|
30
33
|
- Stage 2: 5 parallel validators (cross-validation)
|
|
@@ -68,7 +71,7 @@ If ITERATION > 5:
|
|
|
68
71
|
- If user says stop → STOP.
|
|
69
72
|
- If user says continue → reset limit to ITERATION + 5 and proceed.
|
|
70
73
|
|
|
71
|
-
Create new session directory: SESSION_DIR="
|
|
74
|
+
Create new session directory: SESSION_DIR="$REPO_ROOT/.ai/deepreview/loop-iter$ITERATION-$(date +%Y-%m-%d-%H%M%S)"
|
|
72
75
|
Run `mkdir -p $SESSION_DIR`
|
|
73
76
|
Append SESSION_DIR to ALL_SESSION_DIRS
|
|
74
77
|
|
|
@@ -7,7 +7,10 @@ You are an orchestrator for a multi-agent code review pipeline that posts findin
|
|
|
7
7
|
STEP 1: VALIDATE INPUT
|
|
8
8
|
$ARGUMENTS must be a PR number (integer). If it is not a number, tell the user "Usage: /deepreview-pr-review <PR_NUMBER>" and STOP.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Determine REPO_ROOT — the main repository root (not a worktree root). Run:
|
|
11
|
+
`REPO_ROOT=$(realpath "$(git rev-parse --git-common-dir)" | sed 's|/\.git$||')`
|
|
12
|
+
|
|
13
|
+
Set SESSION_DIR="$REPO_ROOT/.ai/deepreview/$ARGUMENTS-review-$(date +%Y-%m-%d-%H%M%S)"
|
|
11
14
|
Create the directory with `mkdir -p $SESSION_DIR`
|
|
12
15
|
Set INPUT_DESCRIPTION="a PR diff (code changes)"
|
|
13
16
|
|
|
@@ -13,12 +13,14 @@ STEP 1: DETERMINE INPUT
|
|
|
13
13
|
- Set ITERATION=1
|
|
14
14
|
- Set PRIOR_CONTEXT="" (empty — built up across iterations; holds both design context and prior findings)
|
|
15
15
|
- Set ALL_SESSION_DIRS=[] (list of all session directories used, in order)
|
|
16
|
+
- Determine REPO_ROOT — the main repository root (not a worktree root). Run:
|
|
17
|
+
`REPO_ROOT=$(realpath "$(git rev-parse --git-common-dir)" | sed 's|/\.git$||')`
|
|
16
18
|
- If CONTEXT_FILE exists, set PRIOR_CONTEXT="## Design Decisions (intentional — do not flag)\nThe following are deliberate design choices. Do NOT flag these as issues or suggest alternatives.\n`\n" + contents of CONTEXT_FILE + "\n`\n\n"
|
|
17
19
|
|
|
18
20
|
STEP 2: RUN INITIAL DEEPREVIEW-SPEC (full pipeline with cross-validation)
|
|
19
21
|
Run the full deepreview-spec pipeline (Stages 1-5 from the deepreview-spec command):
|
|
20
22
|
|
|
21
|
-
- Determine SESSION_DIR="
|
|
23
|
+
- Determine SESSION_DIR="$REPO_ROOT/.ai/deepreview/spec-loop-iter1-$(date +%Y-%m-%d-%H%M%S)" and write input.txt
|
|
22
24
|
- Append SESSION_DIR to ALL_SESSION_DIRS
|
|
23
25
|
- Stage 1: 5 parallel reviewers (completeness, consistency, feasibility, docs, architecture) — prepend PRIOR_CONTEXT (if non-empty) to each reviewer's prompt as "${PRIOR_CONTEXT}You are reviewing ... Read the content at $SESSION_DIR/input.txt. Write your review to $SESSION_DIR/review-{perspective}.md."
|
|
24
26
|
- Stage 2: 5 parallel validators (cross-validation)
|
|
@@ -57,7 +59,7 @@ If ITERATION > 7:
|
|
|
57
59
|
- Show the latest stats.
|
|
58
60
|
- STOP.
|
|
59
61
|
|
|
60
|
-
Create new session directory: SESSION_DIR="
|
|
62
|
+
Create new session directory: SESSION_DIR="$REPO_ROOT/.ai/deepreview/spec-loop-iter$ITERATION-$(date +%Y-%m-%d-%H%M%S)"
|
|
61
63
|
Run `mkdir -p $SESSION_DIR`
|
|
62
64
|
Append SESSION_DIR to ALL_SESSION_DIRS
|
|
63
65
|
|
|
@@ -8,7 +8,9 @@ STEP 1: DETERMINE SESSION DIRECTORY
|
|
|
8
8
|
|
|
9
9
|
- If "$ARGUMENTS" starts with `--context <path>`, extract CONTEXT_FILE=<path> and remove it from $ARGUMENTS before parsing the rest.
|
|
10
10
|
- Validate CONTEXT_FILE: it must be a relative path (no leading `/`), must not contain `..`, must exist on disk, and must be a regular file (not a directory or symlink to outside the project), and must be under 50KB. If validation fails, tell the user the error and STOP.
|
|
11
|
-
-
|
|
11
|
+
- Determine REPO_ROOT — the main repository root (not a worktree root). Run:
|
|
12
|
+
`REPO_ROOT=$(realpath "$(git rev-parse --git-common-dir)" | sed 's|/\.git$||')`
|
|
13
|
+
- Set SESSION_DIR="$REPO_ROOT/.ai/deepreview/spec-$(date +%Y-%m-%d-%H%M%S)"
|
|
12
14
|
- Create the directory with `mkdir -p $SESSION_DIR`
|
|
13
15
|
|
|
14
16
|
STEP 2: PREPARE INPUT
|
|
@@ -14,11 +14,14 @@ Classify "$ARGUMENTS":
|
|
|
14
14
|
- If it is multiple space-separated file paths → MODE=files
|
|
15
15
|
- If it is empty → MODE=branch
|
|
16
16
|
|
|
17
|
+
Determine REPO_ROOT — the main repository root (not a worktree root). Run:
|
|
18
|
+
`REPO_ROOT=$(realpath "$(git rev-parse --git-common-dir)" | sed 's|/\.git$||')`
|
|
19
|
+
|
|
17
20
|
Set SESSION_DIR based on mode:
|
|
18
21
|
|
|
19
|
-
- MODE=pr: SESSION_DIR="
|
|
20
|
-
- MODE=files: SESSION_DIR="
|
|
21
|
-
- MODE=branch: SESSION_DIR="
|
|
22
|
+
- MODE=pr: SESSION_DIR="$REPO_ROOT/.ai/deepreview/$ARGUMENTS-$(date +%Y-%m-%d)"
|
|
23
|
+
- MODE=files: SESSION_DIR="$REPO_ROOT/.ai/deepreview/files-$(date +%Y-%m-%d-%H%M%S)"
|
|
24
|
+
- MODE=branch: SESSION_DIR="$REPO_ROOT/.ai/deepreview/$(git branch --show-current)-$(date +%Y-%m-%d)"
|
|
22
25
|
|
|
23
26
|
Create the directory with `mkdir -p $SESSION_DIR`
|
|
24
27
|
|