Skip to content

/ledger-review: one review thread per decision, on its Ledger row - #69

Merged
Carr1005 merged 2 commits into
mainfrom
skill-ledger-review-threads
Oct 20, 2026
Merged

Carr1005 merged 2 commits into
mainfrom
skill-ledger-review-threads

Conversation

@Carr1005

@Carr1005 Carr1005 commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

What changes for a reviewer

Today /ledger-review posts the whole Decision Ledger review as one PR comment, so all discussion lands in one place. After this change it posts a GitHub review on the spec's diff:

  • a header comment on the Ledger table's header lines: the intro, the legend and the known open points;
  • one comment per decision, on that decision's row, so each decision gets its own thread to reply to and resolve.

The content is the same as before, split by decision. Only the closing line changes: it now asks reviewers to reply in each decision's thread.

When part of the Ledger is not in the PR's diff (for example a small hand edit elsewhere in the spec), GitHub can't take a comment on those lines. In that case the whole review goes up as one comment on the file, which still has a thread.

How posting works now

  1. The review is created as pending: only the person running the skill can see it, in the PR's Files changed tab.
  2. verify checks every comment sits on its planned row.
  3. It is submitted only when the user says so. If not wanted, the pending review is deleted and nobody is notified.

A whole-file comment can't be pending on GitHub; it is public when posted, so the skill shows the draft in the terminal first and posts only on the user's go.

Also fixed: finding the previous review

Each review starts with a hidden line naming the spec it reviews; the next review of that spec uses it to copy forward the sections whose decisions didn't change. That line recorded the skill's temporary copy (e.g. /Users/carr/.claude/jobs/…/lr65/spec.md, as in #65's existing comment) instead of the repo path, so the previous review was never found and every section was rewritten.

Files

  • scripts/ledger_review.py: new split and verify commands; previous also finds earlier reviews posted as review comments; new footer.
  • SKILL.md: step 4 passes --path; steps 7–8 (split; show as pending, verify, then submit).
  • references/example-review.md: footer line only.

Tested on #65 (Opus 5.5)

Test Result
Fill and check a real draft PASS
split vs. a split done by hand same lines and same text, 13 comments
Re-review from earlier review comments all 12 unchanged sections copied word for word
Fallback: Ledger outside the diff one whole-file comment, with its own closing line
verify on a real pending review PASS 13/13; a plan with one wrong line FAILs
Publish, then delete all 13 comments nothing left in the PR: no review, no timeline entry

Not tested: posting a whole-file comment (it would be public at once).

🤖 Generated with Claude Code

Carr1005 and others added 2 commits October 20, 2026 22:02
The review now goes up as a GitHub review on the spec diff instead of a
single PR comment: a header comment on the Ledger table's header lines
(legend, open points) and one comment per decision on its row, so each
decision gets its own thread to reply to and resolve.

- ledger_review.py: new `split` (draft -> review.json; whole-file comment
  when any Ledger line is outside the PR's diff) and `verify` (every
  comment sits as a thread on its planned lines); `previous` also reads
  review comments; the footer asks for replies in each decision's thread.
- SKILL.md: steps 7-8 — create the review as pending (only the user sees
  it), verify, submit on the user's go; a whole-file comment is public on
  posting, so it is shown in the terminal first.
- example-review.md: footer line only.

Tested on #65: split matches a hand split; re-review copies all 12
unchanged sections; verify PASS on a pending review and FAIL on a wrong
plan; the fallback writes a whole-file comment. Posting a whole-file
comment is untested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hidden marker recorded the scratch copy's path (e.g.
/Users/.../tmp/lr65/spec.md), so `previous` never found an earlier
single-comment review and every section was rewritten from scratch.

- skeleton takes --path and writes the repo path into the marker;
  SKILL.md step 4 passes it.
- previous also recognises older comments by their row links, which
  carry the repo path. Checked on #65's existing comment: found for the
  loop-engineering spec, not for agent-memory or the lab variant, and it
  yields all 12 sections for reuse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Carr1005
Carr1005 merged commit d2b3136 into main Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant