feat(ship): add external code review command hook to ship workflow
Adds workflow.code_review_command config key that allows solo devs to plug external AI review tools into the ship flow. When configured, the ship workflow generates a diff, builds a review prompt with stats and phase context, pipes it to the command via stdin, and parses JSON output with verdict/confidence/issues. Handles timeout (120s) and failures gracefully by falling through to the existing manual review flow. Closes #1876 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,7 @@ const VALID_CONFIG_KEYS = new Set([
|
||||
'workflow.use_worktrees',
|
||||
'workflow.code_review',
|
||||
'workflow.code_review_depth',
|
||||
'workflow.code_review_command',
|
||||
'git.branching_strategy', 'git.base_branch', 'git.phase_branch_template', 'git.milestone_branch_template', 'git.quick_branch_template',
|
||||
'planning.commit_docs', 'planning.search_gitignored',
|
||||
'workflow.subagent_timeout',
|
||||
@@ -64,6 +65,7 @@ const CONFIG_KEY_SUGGESTIONS = {
|
||||
'hooks.research_questions': 'workflow.research_before_questions',
|
||||
'workflow.research_questions': 'workflow.research_before_questions',
|
||||
'workflow.codereview': 'workflow.code_review',
|
||||
'workflow.review_command': 'workflow.code_review_command',
|
||||
'workflow.review': 'workflow.code_review',
|
||||
'workflow.code_review_level': 'workflow.code_review_depth',
|
||||
'workflow.review_depth': 'workflow.code_review_depth',
|
||||
@@ -154,6 +156,7 @@ function buildNewProjectConfig(userChoices) {
|
||||
skip_discuss: false,
|
||||
code_review: true,
|
||||
code_review_depth: 'standard',
|
||||
code_review_command: null,
|
||||
},
|
||||
hooks: {
|
||||
context_warnings: true,
|
||||
|
||||
Reference in New Issue
Block a user