8000 docs: the README, the package metadata and the community files by dominikwozniak · Pull Request #67 · 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
Diff view
69 changes: 69 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Bug report
description: A command does something other than what it says it does.
labels: [bug]
body:
- type: checkboxes
attributes:
label: Preflight
options:
- label: I am on the latest release of `dw-mc`.
required: true
- label: I searched the open and closed issues and found no duplicate.
required: true
- label: This is not a security issue. Those go through a [private report](https://github.com/dominikwozniak/dw-mc/security/advisories/new).
required: true

- type: textarea
id: what
attributes:
label: What happened
description: What you ran, and what it printed. Paste the output rather than describing it.
render: shell
validations:
required: true

- type: textarea
id: expected
attributes:
label: What you expected instead
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: The shortest path from a working install to the wrong output. Say what state the pull request was in — which bucket, whether it was stamped, whether a review run existed for that head.
value: |
1.
2.
3.
validations:
required: true

- type: input
id: version
attributes:
label: Version
description: The output of `dw-mc --version`.
placeholder: "0.2.0"
validations:
required: true

- type: textarea
id: environment
attributes:
label: Environment
description: "Operating system, `node --version`, `gh --version`, and which agent CLIs are configured as runners."
render: shell
validations:
required: true

- type: textarea
id: config
attributes:
label: Configuration
description: The relevant part of your `config.yaml`, with anything private taken out.
render: yaml
validations:
required: false
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Left open on purpose: a blank issue is how the specs and the working notes in this
# tracker are written, and neither form above fits one.
blank_issues_enabled: true
contact_links:
- name: Security issue
url: https://github.com/dominikwozniak/dw-mc/security/advisories/new
about: Report it privately instead. Do not open a public issue.
- name: What a word means
url: https://github.com/dominikwozniak/dw-mc/blob/main/CONTEXT.md
about: Bucket, stamp, runner, review run, sweep — the glossary defines them all.
- name: Why it works this way
url: https://github.com/dominikwozniak/dw-mc/tree/main/docs/adr
about: The decisions behind the boundaries, each one recorded.
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Feature request
description: A command, a flag, or a rule that is not there yet.
labels: [enhancement]
body:
- type: checkboxes
attributes:
label: Preflight
options:
- label: I searched the open and closed issues and found no duplicate.
required: true
- label: I read [`CONTEXT.md`](https://github.com/dominikwozniak/dw-mc/blob/main/CONTEXT.md) and use its words for what I am describing.
required: true

- type: textarea
id: problem
attributes:
label: The problem
description: What is the moment in your day that this fixes? Name what you do instead today.
validations:
required: true

- type: textarea
id: proposal
attributes:
label: What you would have it do
description: The command and its output, or the rule and what it decides. A sketch of the terminal is worth more than a paragraph.
validations:
required: true

- type: dropdown
id: shape
attributes:
label: What shape is it
options:
- A new command
- A flag on a command that exists
- A change to the bucket rules
- A change to what a command prints
- A change to the configuration file
- Something else
validations:
required: true

- type: textarea
id: boundaries
attributes:
label: Does it stay inside the boundaries
description: "`dw-mc` sends nothing off the machine but calls to GitHub and to local agent CLIs ([ADR 0001](https://github.com/dominikwozniak/dw-mc/blob/main/docs/adr/0001-local-first.md)), and writes to GitHub only your own branches, pull request bodies, failed runs and stamped squash merges ([ADR 0002](https://github.com/dominikwozniak/dw-mc/blob/main/docs/adr/0002-github-write-boundary.md)). Say so if your idea needs either to move."
validations:
required: false

- type: textarea
id: alternatives
attributes:
label: What else you tried
description: Other shapes you considered, or the workaround you run today.
validations:
required: false
36 changes: 36 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!-- LEDE — one paragraph, at most four sentences. Why now: the problem this change answers.
Present tense, as if the branch had always looked this way. No file list, no history, no
"previously / now" — what changed since the last review goes in the conversation, not here.
e.g. "`dw-mc merge` reads the stamp off the state directory and GitHub's verdict off the
last sweep, so a merge can clear a bar that moved an hour ago. It reads both live instead." -->

## What changes

<!-- One to four bullets, one per unit of work, at most two lines each. Lead with the `path` or
the command, then what it now does. Nothing the diff already says, nothing merely planned.
e.g.
- `src/cli/merge.ts` — reads GitHub's half from a fresh `pr view` rather than the sweep.
- **CONTEXT.md** — "Ready" now says which of the two bars is live and which is on disk. -->

## How it flows

<!-- OPTIONAL — one small mermaid diagram, ten nodes at most, and only when the change moves a
flow, a sequence or a state machine AND the picture beats the prose. Otherwise delete this
section, heading included. No prose around it; the diagram stands alone.
A fenced `mermaid` block holding something like:
flowchart LR
sweep[dw-mc sweep] --> place[place] --> bucket[bucket] --> pick[picker] -->

## Test plan

<!-- What was RUN and what it said — the command and its verdict, never an intention. A bug fix
names its regression test. Whatever is left to do by hand goes last, marked "by hand".
e.g.
- `pnpm check` — pass
- `src/domain/merge.test.ts` — 14/14, two new cases for a head that moved mid-run
- by hand: `node dist/bin.js merge 62` against a stamped PR, refused on the stale stamp -->

## Risk

<!-- One line: what breaks if this is wrong, and the way back. Always filled — "None, docs only."
is a real answer and the usual one. A write nothing brings back says so out loud. -->
77 changes: 77 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the maintainer of this repository, [@dominikwozniak](https://github.com/dominikwozniak), through a [private report](https://github.com/dominikwozniak/dw-mc/security/advisories/new) on this repository. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/inclusion).

For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
90 changes: 90 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Contributing

`dw-mc` is a tool one person uses every day, published so anyone else can. Bug reports, reproductions and small fixes are welcome; anything that changes what a command prints or what it writes to disk is worth an issue before a pull request.

## Before you start

Open an issue first for:

- a new command, or a new flag on one
- a change to the bucket rules, the stamp, or what `merge` accepts
- a change to the on-disk state or to `config.yaml`
- a new dependency

Straight to a pull request is fine for: a bug fix with a failing test, a documentation fix, a typo.

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).
- **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

```sh
pnpm install
```

Node 24 or newer, and pnpm — the version is pinned in `package.json`. Never `npm`, `npx`, `yarn` or `bun`; run a one-off tool with `pnpm dlx`.

To run your working copy against real pull requests:

```sh
pnpm build
node dist/bin.js status
```

## The gate

```sh
pnpm check
```

That is the whole gate — `lint`, `format`, `typecheck`, `test`, `build` — and it is what CI runs, followed by a step that packs the tarball, installs it and runs the binary. Each link is also a command of its own:

| Command | What it runs |
| --------------------------------- | ------------------------------------------------------------------------------- |
| `pnpm lint` / `pnpm lint:fix` | oxlint on the Effect engine, which is where the Effect diagnostics are reported |
| `pnpm format` / `pnpm format:fix` | oxfmt, over `.ts`, `.json`, `.md` and `.yaml` alike |
| `pnpm typecheck` | `tsc` over the project |
| `pnpm test` | vitest |
| `pnpm build` | tsdown, to the single `dist/bin.js` |

A commit hook formats what you staged, so a pull request never fails on whitespace alone. Formatting and import order belong to the formatter — never sort or align by hand.

## Writing the code

`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/`.

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).

Every word this project uses in a particular way is defined in [`CONTEXT.md`](./CONTEXT.md). Use those terms verbatim, in code and in prose.

## Commits and branches

A change is built on its own branch, named `type/<issue>-subject`, as in `feat/2-three-test-seams`. Nothing is committed to `main` directly.

Commit subjects follow [Conventional Commits](https://www.conventionalcommits.org): `type(scope): subject`, lowercase, imperative. The body is short prose on _why_, never a list of files. One logical change per commit.

## Pull requests

Pull requests land as a squash merge, so the title is the subject of the commit that lands — it follows the same `type(scope): subject` form.

Fill in [the template](./.github/pull_request_template.md). It asks for what the change is and why, what was actually run, and what breaks if the change is wrong. A bug fix carries a regression test.

Add a changeset when the change is worth releasing:

```sh
pnpm changeset
```

A patch for a fix, a minor for a new command or flag. Nothing gates a pull request on carrying one — a changeset is the decision that something is worth releasing, not a condition of merging. [ADR 0008](./docs/adr/0008-npm-publication.md) has the rest of the release path.

## Decisions

A decision that outlives the pull request that made it goes in `docs/adr/`, numbered, rewritten in place when it changes. An ADR is a snapshot of what holds now, not a changelog of what it replaced.

## License

By contributing you agree that your contributions are licensed under the [MIT License](./LICENSE).
Loading
0