8000 docs(cli): add the command and configuration reference by dominikwozniak · Pull Request #111 · dominikwozniak/dw-mc · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
< 8000 td id="diff-a54ff182c7e8acf56acfd6e4b9c3ff41e2c41a31c9b211b2deb9df75d9a478f9L1" data-line-number="1" class="blob-num blob-num-context js-linkable-line-number">
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dw-mc

A local CLI that keeps the state of my open pull requests on disk, reads GitHub through `gh`, runs code reviews through local agent CLIs, and shows what every PR waits on.
A local CLI that keeps the state of my open pull requests on disk, reads GitHub through `gh`, runs code reviews through the local Claude Code, and shows what every PR waits on.

`CONTEXT.md` is the glossary; use its terms verbatim, and every entry's _Avoid_ line names the synonyms
this repo does not use, so a review reads them as a checklist against the diff. `docs/adr/` holds the
Expand Down
4 changes: 2 additions & 2 deletions CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ The bucket for a PR only I can move: a conflict, red CI that is not flaky, chang
The bucket for a PR whose current head has no review run behind it.

**Waiting on others**:
The bucket for a PR with nothing left for me: a human review is pending.
The bucket for a PR with nothing left for me that still waits: a review from someone else is pending, or CI is still running.

**Ready**:
The bucket for a PR that is approved, green and mergeable. Only my merge is left.
The bucket for a PR nothing is waiting on: no reason to need me, a review run on its head, no review pending and no CI running. An approval is not required, because a repository with no required reviewer never produces one. Only my merge is left.

### Rebase

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Straight to a pull request is fine for: a bug fix with a failing test, a documen

Two boundaries are settled and are not up for a pull request on their own:

- **Nothing leaves the machine** but calls to GitHub and to local agent CLIs — [ADR 0001](./docs/adr/0001-local-first.md).
- **Nothing leaves the machine** but calls to GitHub and to the local Claude Code — [ADR 0001](./docs/adr/0001-local-first.md).
- **What the tool may write to GitHub** is your own branches, your own pull request bodies, your own failed runs, and the squash merge of your own stamped pull request — [ADR 0002](./docs/adr/0002-github-write-boundary.md), [ADR 0008](./docs/adr/0008-merging-my-own-pull-request.md). It never comments, labels, reviews or approves.

## Setup
Expand Down Expand Up @@ -55,7 +55,7 @@ A commit hook formats what you staged, so a pull request never fails on whitespa

`dw-mc` is TypeScript on [Effect](https://effect.website) v4. Before writing Effect code, read `node_modules/effect/AGENTS.md` and follow its links into `node_modules/effect/ai-docs/`; for what the guide does not cover, read `node_modules/effect/src`.

Where a module goes, which way an import may cross a layer, and where its test and its fake live are decided in [ADR 0006](./docs/adr/0006-source-layout.md): `cli` → `domain` → `adapters`, one direction only, no relative imports, a test beside the module it covers. Read it before adding a file to `src/`.
Where a module goes, which way an import may cross a layer, and where its test and its fake live are decided in [ADR 0006](./docs/adr/0006-source-layout.md): `cli` → `domain` → `adapters` → `terms`, one direction only, no relative imports, a test beside the module it covers. Read it before adding a file to `src/`.

What a command may print — what colour says, what dim says, what is never coloured — is [ADR 0007](./docs/adr/0007-what-the-screen-says.md).

Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Ready
◆ dominikwozniak/dw-mc#62 ✓ │ feat(comments): read a pull request's threads │ approved, green, mergeable
```

`+` marks a new pull request, `*` one that moved, and `✓` one you stamped. The full legend is in [`docs/cli.md`](./docs/cli.md#dw-mc-status).

## Install

```sh
Expand Down Expand Up @@ -71,15 +73,15 @@ dw-mc review 62 # review a pull request directly

`dw-mc init` is noninteractive. On its first run it creates the default configuration, then registers the repository you are in. Review behaviour is controlled by `review.command` and `review.prompt`.

Commands accept a pull request as `62` inside its repository or as `owner/name#62` from anywhere.
Commands accept a pull request as `owner/name#62`, or as `62` while only one repository is registered.

## Commands

| Command | What it does |
| --------------------- | -------------------------------------------------------------------------------------- |
| `dw-mc` | Opens the picker with every tracked PR and its available actions. |
| `dw-mc init` | Sets up this machine and registers the current repository. |
| `dw-mc sweep` | Reads GitHub and updates the local record for every tracked PR. |
| `dw-mc sweep` | Reads GitHub and updates the local record for the tracked PRs in the pass. |
| `dw-mc status` | Shows each tracked PR's bucket, stamp and changes since it was last shown. |
| `dw-mc comments <pr>` | Prints the conversation or records your acknowledgement. |
| `dw-mc review <pr>` | Reviews a pull request with Claude Code in a throwaway worktree. |
Expand All @@ -94,7 +96,7 @@ Commands accept a pull request as `62` inside its repository or as `owner/name#6
| `dw-mc cleanup` | Removes clones and completed review worktrees while keeping configuration and records. |
| `dw-mc uninstall` | Removes the state written by `dw-mc` and explains how to remove the binary. |

Run `dw-mc <command> --help` for command options.
A pass covers the registered repository you stand in, or every registered repository from anywhere else; `--repo` and `--all` change that. Every flag is in [`docs/cli.md`](./docs/cli.md), and `dw-mc <command> --help` prints the same list.

## How it works

Expand All @@ -118,7 +120,7 @@ Every other word this tool uses is defined in [`CONTEXT.md`](./CONTEXT.md), and
- Configuration: `$XDG_CONFIG_HOME/dw-mc/config.yaml`, or `~/.config/dw-mc/config.yaml`
- State, including the worktrees: `$XDG_STATE_HOME/dw-mc`, or `~/.local/state/dw-mc`

`dw-mc init` writes the configuration file. Every key is optional, and entries under `repos` override `defaults` using the same shape.
`dw-mc init` writes the configuration file. Every key is optional, and entries under `repos` override `defaults` using the same shape. Every key, its values and what it changes are in [`docs/configuration.md`](./docs/configuration.md).

```yaml
launcher:
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If either is missing, **proceed silently**. Don't flag the absence; don't sugges
├── docs/adr/
│ ├── 0001-local-first.md
│ ├── 0002-github-write-boundary.md
│ └── 0003-own-public-repository.md
│ └── …
└── src/
```

Expand Down
2 changes: 1 addition & 1 deletion docs/agents/issue-tracker.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Infer the repo from `git remote -v`; `gh` does this automatically when run insid

## Not the same surface as ADR 0002

[ADR 0002](../adr/0002-github-write-boundary.md) bars mission control, the program, from commenting, labelling, reviewing or merging on the pull requests it tracks. That boundary is about the tool's runtime behaviour against other people's PR surfaces.
[ADR 0002](../adr/0002-github-write-boundary.md) bars mission control, the program, from commenting, labelling or reviewing on the pull requests it tracks, and [ADR 0008](../adr/0008-merging-my-own-pull-request.md) admits one merge: my own Ready, stamped pull request. That boundary is about the tool's runtime behaviour against other people's PR surfaces.

This file is about the agent's own workflow on this repo's issues. Creating, labelling, commenting on and closing `dominikwozniak/dw-mc` issues is how the work is tracked and is unaffected by ADR 0002.

Expand Down
Loading
Loading
0