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]| Flag | Type | Required | Description |
|---|---|---|---|
--problem | string | no | Problem this solution addresses (prompts interactively if not provided) |
--supersedes | string | no | Solution this supersedes (title or UUID prefix) |
--reviewer | string (repeatable) | no | Assign reviewers at creation (e.g., @alice) |
--tags | string | no | Comma-separated tags (e.g., refactor,backend,size:L) |
--force, -f | flag | no | Create 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 initjjj 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 listAssign reviewers at creation:
jjj solution new "Add caching" --problem "Login is too slow" --reviewer @alice --reviewer @bobWhen 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]| Flag | Type | Description |
|---|---|---|
--problem | string | Filter by problem |
--status | string | Filter by status (proposed, submitted, withdrawn, approved) |
--search | string | Search solutions by title text |
--tag | string | Filter by tag (case-insensitive exact match) |
--json | bool | Output in JSON format |
jjj solution list --problem "Login is too slow"jjj solution list --status submittedjjj solution list --jsonjjj solution show
Show solution details.
jjj solution show <solution_id> [OPTIONS]| Flag | Type | Description |
|---|---|---|
--json | bool | Output in JSON format |
jjj solution show "Add connection"jjj solution show "Add connection" --jsonjjj solution edit
Edit solution details.
jjj solution edit <solution_id> [OPTIONS]| Flag | Type | Description |
|---|---|---|
--title | string | New title |
--status | string | New status |
--add-tag | string | Add a tag |
--remove-tag | string | Remove a tag |
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>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.
jjj solution detach "Add connection"jjj solution detach "Add connection" abc123jjj solution submit
Submit a solution for review — opens it for critique.
jjj solution submit <solution_id>jjj solution submit "Add connection"jjj solution approve
Approve a solution. Requires no open critiques (including critique-based review). Auto-solves the problem if this is the only active solution.
jjj solution approve <solution_id> [OPTIONS]| Flag | Type | Description |
|---|---|---|
--force | bool | Force approve even with open critiques (sets force_approved flag) |
--rationale | string | Reason for approving |
--no-rationale | flag | Skip the rationale prompt |
The approval gate checks that all critiques are resolved (addressed, dismissed, or validated). This includes:
- Regular critiques — issues raised about the solution’s approach
- Review critiques — review requests (critiques with
--reviewerflag) that must be addressed by the assigned reviewer
Using --force bypasses the check and sets the force_approved flag on the solution.
jjj solution approve "Add connection"jjj solution approve "Add connection" --forcejjj solution withdraw
Withdraw a solution (criticism showed it will not work).
jjj solution withdraw <solution_id> [OPTIONS]| Flag | Type | Description |
|---|---|---|
--rationale | string | Reason for withdrawing |
--no-rationale | flag | Skip the rationale prompt |
jjj solution withdraw "Add connection"jjj solution assign
Assign a solution to a person.
jjj solution assign <solution_id> [OPTIONS]| Flag | Type | Description |
|---|---|---|
--to | string | Assignee name (defaults to self) |
jjj solution assign "Add connection" --to bobjjj 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>jjj solution resume "Add connection"jjj solution diff
Show the jj diff output for all change IDs attached to a solution.
jjj solution diff <solution_id>Prints === Change: <id> === before each diff. If a change is not present in the local repo, a note is shown and the next change is tried. If no change IDs are attached, prints an informative message.
jjj solution diff "Add connection"jjj solution lgtm
Sign off on a solution as a reviewer. This addresses your open review critique for the solution, recording your approval.
jjj solution lgtm <solution_id>jjj solution lgtm "Add connection"jjj solution comment
Leave a reply on a critique attached to a solution.
jjj solution comment <solution_id> --critique <critique_id> <body>| Flag | Type | Required | Description |
|---|---|---|---|
--critique | string | yes | The critique to reply to (title or UUID prefix) |
jjj solution comment "Add connection" --critique "Missing error" "Fixed in latest change"