Skip to content

Add --review=code-reviewer option to /ship as alternative to gate2 cascade #66

@JFK

Description

@JFK

Summary

Add a --review=code-reviewer flag to /gh-issue-driven:ship that skips the current gate2 cascade (audit + cso + qa-lead + cto parallel skills) and instead invokes the feature-dev:code-reviewer Agent for review.

Rationale: the feature-dev:code-reviewer agent has its own context window (can freely read changed files via tools, not just the prompt-embedded diff), uses confidence-based filtering to surface only high-priority issues, and covers security/bug/quality/conventions in a single pass. This offers a faster, more code-quality-focused alternative to the governance-lensed gate2.

Context

Priority: medium
Suggested labels: enhancement
Suggested milestone: (none)

Acceptance Criteria

  • New flag --review=<target> added to /gh-issue-driven:ship argument parser.
    • Initial supported target: code-reviewer (maps to feature-dev:code-reviewer agent).
    • Reserved syntax for future targets (e.g. --review=code-reviewcode-review:code-review skill).
  • When --review=code-reviewer is set:
    • Gate2 cascade (audit + cso + qa-lead + cto) is skipped entirely (same skip mechanism as auto-skip).
    • The feature-dev:code-reviewer agent is invoked via the Agent tool with the branch diff and PR context as input.
    • Agent output is parsed into pass | fail per ship.md's existing gate2 verdict contract.
  • Verdict mapping: agent output is fail if it contains high-priority markers (must fix, blocker, critical, high-priority, etc.); otherwise pass. Exact marker list finalized during implementation, in the same heuristic-fallback style as start.md step 11.
  • HITL behavior: matches current gate2 — green still requires HITL confirmation per the feedback_gate2_green_hitl.md memory.
  • Interaction with auto-skip: orthogonal. If both flags are set, auto-skip wins (stricter omission — docs-only means "no review needed").
  • If the feature-dev:code-reviewer agent is unavailable, the command must degrade gracefully — log a warning, fall back to the default gate2 cascade. No silent failure.
  • /gh-issue-driven:doctor updated to report whether feature-dev:code-reviewer is available.
  • README updates (EN + JA) documenting the new flag, its trade-offs vs gate2, and the orthogonality with auto-skip.

Design notes (non-blocking, for implementer reference)

  • Precedent: auto-skip from PR feat(start,ship): token-efficient flags for cascade gating (#64) #65 already implements a gate2 short-circuit with a synthetic ## Verdict: pass and sentinel gate2.reviewer="diff-scope-skip". The code-reviewer path should mirror this — synthetic verdict + gate2.reviewer="code-reviewer-agent".
  • Flag-naming convention (per session-2026-05-19 PR feat(start,ship): token-efficient flags for cascade gating (#64) #65 discussion): bare-word for heuristic flags, --prefix for skill/tool injection. --review= falls under the latter and leaves room for future targets.
  • Out of scope (separate issues if pursued): auto-routing between gate2 / code-reviewer based on diff characteristics; supporting code-review:code-review skill as a target; promoting code-reviewer to default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions