Skip to content
Draft
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cmd/entire/cli/agent/claudecode/reviewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ func NewReviewer() *reviewtypes.ReviewerTemplate {
// Exposed at package level for test inspection of argv and env.
func buildReviewCmd(ctx context.Context, cfg reviewtypes.RunConfig) *exec.Cmd {
prompt := review.ComposeReviewPrompt(cfg)
cmd := exec.CommandContext(ctx, "claude", "-p", prompt, "--output-format", "stream-json", "--verbose")
args := []string{"-p", prompt, "--output-format", "stream-json", "--verbose"}
if cfg.Model != "" {
args = append(args, "--model", cfg.Model)
}
cmd := exec.CommandContext(ctx, "claude", args...)
cmd.Env = review.AppendReviewEnv(os.Environ(), "claude-code", cfg, prompt)
return cmd
}
Expand Down
6 changes: 5 additions & 1 deletion cmd/entire/cli/agent/codex/reviewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ func NewReviewer() *reviewtypes.ReviewerTemplate {
func buildCodexReviewCmd(ctx context.Context, cfg reviewtypes.RunConfig) *exec.Cmd {
promptCfg := cfg
promptCfg.Skills = expandCodexBuiltinReview(cfg.Skills)
args := []string{codexExecCommand, "--skip-git-repo-check", "--json", "-"}
args := []string{codexExecCommand, "--skip-git-repo-check", "--json"}
if cfg.Model != "" {
args = append(args, "--model", cfg.Model)
}
args = append(args, "-")
prompt := review.ComposeReviewPrompt(promptCfg)
cmd := exec.CommandContext(ctx, "codex", args...)
cmd.Stdin = strings.NewReader(prompt)
Expand Down
6 changes: 5 additions & 1 deletion cmd/entire/cli/agent/geminicli/reviewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ func buildGeminiReviewCmd(ctx context.Context, cfg reviewtypes.RunConfig) *exec.
// Per the existing GenerateText implementation: pass "-p " " " as the
// argv placeholder to trigger headless (non-interactive) mode, and pipe
// the actual prompt via stdin to avoid argv size limits.
cmd := exec.CommandContext(ctx, "gemini", "-p", " ")
args := []string{"-p", " "}
if cfg.Model != "" {
args = append(args, "--model", cfg.Model)
}
cmd := exec.CommandContext(ctx, "gemini", args...)
cmd.Stdin = strings.NewReader(prompt)
// Agent name must equal string(ag.Name()) — adoptReviewEnv compares
// ENTIRE_REVIEW_AGENT against it; any drift silently skips adoption.
Expand Down
28 changes: 21 additions & 7 deletions cmd/entire/cli/integration_test/review_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,17 @@ func TestReviewCommand_PassesReviewEnvToSpawnedAgentHook(t *testing.T) {
env := NewFeatureBranchEnv(t)
enableReviewAgent(t, env, "claude-code")
env.WriteSettings(map[string]any{
"enabled": true,
"review": map[string]any{
"claude-code": map[string]any{
"skills": []string{"/review"},
"enabled": true,
"review_default_profile": "general",
"review_profiles": map[string]any{
"general": map[string]any{
"task": "Test review task.",
"agents": map[string]any{
"claude-code": map[string]any{
"skills": []string{"/review"},
},
},
"master": "claude-code",
},
},
})
Expand Down Expand Up @@ -229,9 +236,16 @@ func TestReview_MissingSkillAtSpawn_ErrorsCleanly(t *testing.T) {
enableReviewAgent(t, env, "claude-code")

env.WriteSettings(map[string]any{
"review": map[string]any{
"claude-code": map[string]any{
"skills": []string{"/nonexistent:skill-xyz"},
"review_default_profile": "general",
"review_profiles": map[string]any{
"general": map[string]any{
"task": "Test review task.",
"agents": map[string]any{
"claude-code": map[string]any{
"skills": []string{"/nonexistent:skill-xyz"},
},
},
"master": "claude-code",
},
},
})
Expand Down
2 changes: 1 addition & 1 deletion cmd/entire/cli/labs.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var experimentalCommands = []experimentalCommandInfo{
{
Name: "review",
Invocation: "entire review",
Summary: "Run configured review skills against the current branch",
Summary: "Run a review profile against the current branch",
},
{
Name: "investigate",
Expand Down
Loading
Loading