review-state: add a path subcommand and a default output for write --from-stdin #710

Closed
opened 2026-10-04 14:46:39 +00:00 by claude · 0 comments
Member

Problem

After IW-702 the review-state card lives in the common git dir. Callers that are not Scala (bash hooks, agent instructions, E2E scripts) cannot find or read it without copying the layout of IW-702. kanon has nine such readers (dev-docs#439). Its rule is that kanon reaches the card only through the core, never by a literal path.

Two gaps on main at 89b06934:

  1. iw review-state has only validate, write and update (core/commands/ReviewState.scala:710-724). Nothing prints where the card is.
  2. write --from-stdin fails without --output ("--output is required with --from-stdin", core/commands/ReviewState.scala:381). write with flags already resolves its default output.

Scope

  • Add iw review-state path [--key K]. It prints the absolute path of the card that ReviewStatePath resolves and exits 0 if the card exists, 1 if no card exists. Without --key, it uses the key of the current worktree (issue or framed effort). With --key, it resolves that key from any worktree of the repository (the card is in the common git dir).
  • Give write --from-stdin the same default output as write.
  • Update docs/commands/review-state.md and the command declaration.

Decided

  • The form is path, not show: callers keep reading the card with jq or the Read tool (dev-docs#439, analysis).
  • Release this together with IW-702, so that one release carries both and kanon can follow it at once (--commit is removed with no shim).

Consumer

kanon dev-docs#439 phases 2 and 3 wait for this issue to be merged.

## Problem After IW-702 the review-state card lives in the common git dir. Callers that are not Scala (bash hooks, agent instructions, E2E scripts) cannot find or read it without copying the layout of IW-702. kanon has nine such readers (dev-docs#439). Its rule is that kanon reaches the card only through the core, never by a literal path. Two gaps on `main` at `89b06934`: 1. `iw review-state` has only `validate`, `write` and `update` (`core/commands/ReviewState.scala:710-724`). Nothing prints where the card is. 2. `write --from-stdin` fails without `--output` ("--output is required with --from-stdin", `core/commands/ReviewState.scala:381`). `write` with flags already resolves its default output. ## Scope - Add `iw review-state path [--key K]`. It prints the absolute path of the card that `ReviewStatePath` resolves and exits 0 if the card exists, 1 if no card exists. Without `--key`, it uses the key of the current worktree (issue or framed effort). With `--key`, it resolves that key from any worktree of the repository (the card is in the common git dir). - Give `write --from-stdin` the same default output as `write`. - Update `docs/commands/review-state.md` and the command declaration. ## Decided - The form is `path`, not `show`: callers keep reading the card with `jq` or the Read tool (dev-docs#439, analysis). - Release this together with IW-702, so that one release carries both and kanon can follow it at once (`--commit` is removed with no shim). ## Consumer kanon dev-docs#439 phases 2 and 3 wait for this issue to be merged.
mph closed this issue 2026-10-04 18:30:09 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
iterative-works/iw-cli#710
No description provided.