8000 feat(status): print the pass as JSON, and name this machine's setup on --help by dominikwozniak · Pull Request #108 · dominikwozniak/dw-mc · GitHub
[go: up one dir, main page]

Skip to content

feat(status): print the pass as JSON, and name this machine's setup on --help - #108

Merged
dominikwozniak merged 3 commits into
mainfrom
feat/48-status-json
Sep 19, 2026
Merged

dominikwozniak merged 3 commits into
mainfrom
feat/48-status-json

Conversation

@dominikwozniak
Copy link
Copy Markdown
Owner

An agent session using the /dw-mc skill, or jq, cannot read what every tracked PR waits on without parsing a table drawn for me. dw-mc status --json prints the same pass as one document, and the root help screen names where this machine keeps its configuration and state, so a new terminal shows at a glance whether the tool is set up.

What changes

  • dw-mc status --json — prints the pass through the StatusJson schema: every row's bucket, reason, stamp, what moved and every fact flat, then repos, leftOut and troubles. It honours --repo and --all, reads the watermark without moving it, draws no heartbeat, and prints the same shape with empty arrays where nothing is registered.
  • dw-mc --help — under the logo, config names the file and how many repositories it registers, and state names the state directory. The file is read only when --help runs; a malformed file or none shortens the line and keeps the screen.
  • ADR 0010 — names --help as the one screen that keeps going on a file this version cannot read.
  • README, skills/dw-mc/SKILL.md — list --json on status and send a session to it.

Test plan

  • pnpm check — pass, 781 tests
  • src/cli/status.test.ts — six new cases: shape and order, since, the watermark left alone, troubles and leftOut with no heartbeat, --repo/--all, nothing registered
  • src/cli/header.test.ts — six new cases: the two lines, XDG paths, dimmed paths, no config, malformed config, and nothing on --version, status --help or a failed parse
  • node dist/bin.js --help, --version and status --json | jq on this machine — the two lines under the logo, the version screen as before, one document, exit 0
  • by hand: dw-mc --help with a malformed config.yaml says it cannot be read and still prints the help

Risk

Low: both changes only read. If the help lines are wrong, the way back is a revert; status without --json is untouched.

Closes #48

🤖 Generated with Claude Code

dominikwozniak and others added 3 commits September 19, 2026 09:22
A session using the /dw-mc skill, or jq, needs the pass without parsing
the table. The document carries what the table says after it, troubles
and the left-out count, and it reads the watermark without moving it,
because a machine reading the pass is not me looking.

Refs #48

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The root help screen now says where the configuration is, how many
repositories it registers and where the state lives. The file is read
only when --help runs, and a file that cannot be read or is missing
shortens the line instead of taking the help screen down.

Refs #48

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…lformed

Only a malformed file earns "cannot be read"; a store that fails outright
drops the setup lines instead of misreporting the file. ADR 0010 now
names --help as the one screen that keeps going on such a file.

Refs #48

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dominikwozniak
dominikwozniak merged commit 568c164 into main Sep 19, 2026
1 check passed
@dominikwozniak
dominikwozniak deleted the feat/48-status-json branch September 19, 2026 07:35
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.

feat(ui): status as JSON, and what the help screen says about this machine

1 participant

0