Skip to content

feat: add ledger digest layer to specflow-watch review section (#183)#185

Merged
skr19930617 merged 1 commit into
mainfrom
extend-specflow-watch-with-review-ledger-digests-and-subagent-activity
Apr 25, 2026
Merged

feat: add ledger digest layer to specflow-watch review section (#183)#185
skr19930617 merged 1 commit into
mainfrom
extend-specflow-watch-with-review-ledger-digests-and-subagent-activity

Conversation

@skr19930617

Copy link
Copy Markdown
Owner

Summary

  • Adds a ledger-backed digest layer to the specflow-watch Review section, rendered below the existing snapshot progress lines without altering snapshot behavior.
  • New tolerant readers for review-ledger-design.json / review-ledger.json with full-schema validation, decision parity check, and tighter ReviewFinding validation (id/title/severity/status required).
  • Family selection (selectActiveReviewLedger) mirrors the snapshot family rule; digest is hidden for non-review phases.
  • Digest renders Decision / Findings counts / open-severity breakdown / top-3 unresolved findings ranked by severity (HIGH or CRITICAL → MEDIUM → LOW) → latest_round DESC → id ASC.
  • Below 80 columns, the findings list collapses and other digest lines truncate with an ellipsis () instead of wrapping.
  • Watcher remains strictly read-only — import-graph guard unchanged; no new orchestration imports, no new observation events.
  • Phase 1 omits the Latest summary: line per the spec scenario "Latest round summary missing elides the line"; a Phase 2 follow-up can add a persisted narrative source.

Test plan

  • npm test — 953 tests pass
  • Reader tests cover absent / unreadable / malformed / empty round_summaries / decision-parity violation / finding-missing-required-field
  • Model tests cover hidden / placeholder / warning / ok states, severity aggregation including critical → HIGH, ranking ties, summaryState absent
  • Renderer tests cover wide-terminal full digest, narrow-terminal collapse + ellipsis, ledger-only (snapshot absent) still renders digest, digest hidden on non-review phases
  • Integration tests cover initial digest render and redraw after on-disk ledger update
  • Import-graph guard verifies no orchestration mutators leaked into the watch entrypoint

Issue

Closes #183

Extend the specflow-watch TUI's Review section with a ledger-backed digest
rendered below the existing snapshot progress lines. The digest reads the
family-mapped review-ledger file (design or apply) using a tolerant reader
with full-schema validation, and renders decision, counts, open-severity
breakdown, and a ranked top-3 of open findings (severity → latest_round
DESC → id ASC). Below 80 columns the findings list collapses and other
digest lines truncate with an ellipsis. The latest-summary line is omitted
per the spec scenario "Latest round summary missing elides the line"
because no compliant persisted narrative source exists in the current
ledger contract; a future change can extend LedgerRoundSummary.

The digest layer is independent from the snapshot progress layer; either
can render alone. The watcher remains strictly read-only — no new writes,
no orchestration imports, no new observation events. The import-graph
guard is unchanged.

Issue: #183
@skr19930617 skr19930617 merged commit d909ee0 into main Apr 25, 2026
4 checks passed
@skr19930617 skr19930617 deleted the extend-specflow-watch-with-review-ledger-digests-and-subagent-activity branch April 25, 2026 04:32
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.

Extend specflow-watch with review ledger digests and subagent activity

1 participant