Skip to content

Solution Commands

Solution Commands

Solutions are conjectures proposed to solve problems. They go through a lifecycle: proposed, submitted, approved, or withdrawn. Solutions can have jj changes attached, be critiqued, and have reviewers assigned whose sign-offs gate acceptance.

jjj solution new

Create a new solution.

jjj solution new <title> [OPTIONS]
FlagTypeRequiredDescription
--problemstringnoProblem this solution addresses (prompts interactively if not provided)
--supersedesstringnoSolution this supersedes (title or UUID prefix)
--reviewerstring (repeatable)noAssign reviewers at creation (e.g., @alice)
--force, -fflagnoCreate even if a similar solution already exists

When --problem is not provided, lists open problems and prompts you to select one interactively. After creation, automatically creates a jj change and attaches it to the solution. The solution stays in proposed status until you explicitly run solution submit.

jjj init
jjj problem new "Login is too slow"
jjj solution new "Add connection pooling" --problem "Login is too slow"
jjj solution new "Use async auth" --problem "Login is too slow" --supersedes "Add connection"
jjj solution list

Assign reviewers at creation:

Terminal window
jjj solution new "Add caching" --problem "Login is too slow" --reviewer @alice --reviewer @bob

When reviewers are assigned, the solution requires all of them to sign off before it can be approved. Sign-offs are recorded via review-type critiques. Review is not required by default — it is enabled per-solution by assigning reviewers.

jjj solution list

List all solutions.

jjj solution list [OPTIONS]
FlagTypeDescription
--problemstringFilter by problem
--statusstringFilter by status (proposed, submitted, withdrawn, approved)
--searchstringSearch solutions by title text
--jsonboolOutput in JSON format
jjj solution list --problem "Login is too slow"
jjj solution list --status submitted
jjj solution list --json

jjj solution show

Show solution details.

jjj solution show <solution_id> [OPTIONS]
FlagTypeDescription
--jsonboolOutput in JSON format
jjj solution show "Add connection"
jjj solution show "Add connection" --json

jjj solution edit

Edit solution details.

jjj solution edit <solution_id> [OPTIONS]
FlagTypeDescription
--titlestringNew title
--statusstringNew status
Terminal window
jjj solution edit "Add connection" --title "Add connection pooling with retry"

jjj solution attach

Attach the current jj change to a solution.

jjj solution attach <solution_id>
Terminal window
jjj solution attach "Add connection"

jjj solution detach

Detach a change from a solution.

jjj solution detach <solution_id> [change_id]

If no change ID is given, detaches the current change.

Terminal window
jjj solution detach "Add connection"
jjj solution detach "Add connection" abc123

jjj solution submit

Submit a solution for review — opens it for critique.

jjj solution submit <solution_id>
Terminal window
jjj solution submit "Add connection"

jjj solution approve

Approve a solution — accept critique, integrate code, solve the problem. Requires no open critiques (including critique-based review).

jjj solution approve <solution_id> [OPTIONS]
FlagTypeDescription
--forceboolForce approve even with open critiques (sets force_approved flag)
--rationalestringReason for accepting
--no-rationaleflagSkip the rationale prompt

The acceptance gate checks that all critiques are resolved (addressed, dismissed, or validated). This includes:

  1. Regular critiques — issues raised about the solution’s approach
  2. Review critiques — review requests (critiques with --reviewer flag) that must be addressed by the assigned reviewer

Using --force bypasses the check and sets the force_approved flag on the solution.

Terminal window
jjj solution approve "Add connection"
jjj solution approve "Add connection" --force

jjj solution withdraw

Refute a solution (criticism showed it will not work).

jjj solution withdraw <solution_id> [OPTIONS]
FlagTypeDescription
--rationalestringReason for refuting
--no-rationaleflagSkip the rationale prompt
Terminal window
jjj solution withdraw "Add connection"

jjj solution assign

Assign a solution to a person.

jjj solution assign <solution_id> [OPTIONS]
FlagTypeDescription
--tostringAssignee name (defaults to self)
Terminal window
jjj solution assign "Add connection" --to bob

jjj solution resume

Resume working on an existing solution. Switches to the solution’s most recent jj change, or creates a new change if none exists.

jjj solution resume <solution_id>
Terminal window
jjj solution resume "Add connection"