diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..99f43a8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,28 @@ +--- +name: Bug report +about: Something doesn't behave the way it should +labels: bug +--- + +## SSCCE + +A **Short, Self-Contained, Correct (Compilable) Example** — the smallest +component usage that still reproduces the bug, with nothing to install or +assume. Paste it as a single block; we should be able to copy it, run it, +and see the bug with zero edits. + +```tsx +// paste your minimal repro here +``` + +## Expected + +What you expected it to do. + +## Actual + +What it actually did. + +## Version + +- `@dunky-dev/*` package and version: diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..0086358 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..7c14a13 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ +# Why/What + + + +# Changes + + + +# Issues + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..c648608 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# Contributing + +For the contribution _workflow_, code conventions, and boundaries, see [`AGENTS.md`](./AGENTS.md) — it's the same +contract agents follow here, and it applies to you too. + +## Setup + +```bash +git clone git@github.com:dunky-dev/ui.git +cd ui +nvm use +corepack enable +pnpm install +``` + +## Commands + +| Command | What it does | +| ------------------------------- | ---------------------------------------------------------- | +| `pnpm test` | Full test suite, watch mode | +| `pnpm typecheck` | `tsc --noEmit` across the whole workspace | +| `pnpm lint` | `oxlint` | +| `pnpm format` / `format:check` | `oxfmt` | +| `pnpm knip` | Unused exports/dependencies | +| `pnpm changeset` | Add a changeset — see [Versioning](./AGENTS.md#versioning) | + +Target one package or one file instead of the whole workspace: + +```bash +pnpm --filter @dunky-dev/core test +pnpm test packages/core/src/some-file.test.ts +``` + +## Storybook + +Each UI substrate (React, Vue, ...) is a self-contained package under +`packages/` with its own Storybook — the fastest way to see a +change actually render. `pnpm dev` delegates to the substrate's package via +`scripts/sb.js`: + +```bash +pnpm dev # @dunky-dev/react Storybook, defaults to http://localhost:6006 +pnpm dev vue # once packages/vue exists +pnpm build-storybook # static build of the react substrate's Storybook +``` + +## Filing an issue + +A bug report is only as useful as its reproduction. Use an **SSCCE** — Short, +Self-Contained, Correct (Compilable) Example: + +- **Short** — the smallest snippet that still reproduces it. Strip every + prop, wrapper, and state change that isn't load-bearing. +- **Self-contained** — no missing imports, no "assume you have X set up." + Someone should be able to paste it and run it with nothing else. +- **Correct (compilable)** — it actually runs and actually reproduces the + bug. Not what you _think_ is happening — what you pasted and ran. + +The [bug report template](.github/ISSUE_TEMPLATE/bug_report.md) asks for +exactly this. If you can't shrink your repro to an SSCCE, that's often a sign +the bug isn't where you think it is — shrinking it is frequently how you find +the real cause yourself. + +## Pull requests + +### Humans + +When using AI to help write changes, read the diff like you wrote it yourself +before asking someone else to. Cut comments that don't say anything, drop +anything that drifted from what you're actually fixing, and be able to +explain any line if asked. A reviewer's time isn't free. + +### AI + +Before opening it, make sure tests, lint, and typecheck pass, and a changeset is +included — see `AGENTS.md`'s Workflow section.