# Contributions to Mailwoman Thanks for wanting to help. Mailwoman is a postal-address parser — a calibrated, retrieval-augmented neural sequence labeler plus a Who's On First gazetteer resolver — and there's plenty to do at every layer: the model, the resolver, the CLI, the docs, the data pipelines. This guide covers the general flow. If you're touching the **model** (training, corpus subsets, evals), read [`docs/engineering/CONTRIBUTING_MODEL_WORK.mdx`](./docs/engineering/CONTRIBUTING_MODEL_WORK.mdx) first — model work has its own required checks and discipline. ## Before you start For anything larger than a typo or an obvious bug fix, open an issue first so we can agree on the approach before you spend the time. ## Contribution terms (DCO + dual license) Mailwoman is dual-licensed under **AGPL-3.0-only** and a separate **commercial license** (see [`LICENSE.md`](./LICENSE.md)). For that dual model to hold, every contribution has to reach us under terms that let us offer it under _both_ licenses. So, by submitting a contribution (a pull request, patch, or any change), you agree to the following. **You keep the copyright in your contribution** — this is a license grant rather than an assignment. 1. **Developer Certificate of Origin.** By submitting a contribution you certify the DCO (version 1.1, full text below) for every commit in it — the submission itself is the certification. A `Signed-off-by` trailer (`git commit -s`) is welcome but not required, and no CI check looks for one. 2. **License grant.** You grant Teffen Ellis a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license to use, reproduce, modify, prepare derivative works of, publicly display, publicly perform, and distribute your contribution and such derivative works, and to **sublicense and relicense** your contribution under any terms — including under AGPL-3.0-only and under Sister Software's commercial license (and any future or successor versions of either). You also grant a patent license on the same terms as Section 11 of the AGPL for any patent claims you own that are necessarily infringed by your contribution. 3. **You have the right to grant this.** Your contribution is your original work, or you otherwise have the rights to submit it under these terms. If your employer has rights to work you create, you have permission to make the contribution, or your employer has waived those rights. If you're contributing on behalf of a company and need a signed corporate CLA rather than the DCO certification, contact hello@sister.software.
Developer Certificate of Origin 1.1 (full text) ```text Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. ```
## Prerequisites - **Node ≥ 24.18.0** (the published `engines` floor). The repo itself is developed on Node 26. - **Yarn 4** via Corepack — don't install Yarn globally. - **git**, and a POSIX-ish shell for the helper scripts. ## Setup ```sh git clone https://github.com/sister-software/mailwoman.git cd mailwoman corepack enable # activates the pinned Yarn 4 yarn install --immutable # honors the committed lockfile yarn compile # tsc -b across all workspaces yarn test # vitest (Ctrl-C to exit watch; `yarn ci:test` runs once) ``` If `yarn install --immutable` fails, the lockfile is out of date — fix that before anything else. A stale lockfile otherwise makes every later step fail. ### A note on the model weights The trained model binaries (`model.onnx`, `tokenizer.model`) are **not committed to git** — they're large, and they version on a different cadence than the code. Most contributions (parser logic, the resolver, the CLI, docs, data pipelines) don't need them. The handful of tests that do are conditional and will skip without error without them. If you do need the weights — to run the neural classifier locally or work on the model — see [`REPRODUCIBILITY.md`](./REPRODUCIBILITY.md) for how the artifacts are produced and fetched. The published `@mailwoman/neural-weights-en-us` / `-fr-fr` npm packages also contain a usable bundle. ## Repository layout Mailwoman is a Yarn-4 monorepo. Public workspaces live under `packages/`. Source lives at each workspace's root, except `packages/corpus/` and `docs/`, which use `src/`. Tests are co-located as `*.test.ts`. The orientation table and the architectural "why" live in [`AGENTS.md`](./AGENTS.md) — read it before changing anything structural. The short version: - `packages/mailwoman/` — the CLI + the high-level pipeline (the user-facing entry). - `packages/core/` — tokenization, classification, the solver/decoder, bundled dictionaries. - `packages/resolver*/`, `packages/codex/`, `packages/corpus/`, `packages/neural*/`, `packages/spatial/`, `packages/normalize/`, … — the supporting packages. - `docs/` — the Docusaurus site published to https://mailwoman.post. ## Build, test, and type-check commands | Command | What it does | | -------------------------------------- | ------------------------------------------------------------------- | | `yarn compile` | `tsc -b` over the workspaces (the build) | | `yarn test` | vitest, watch mode | | `yarn ci:test` | vitest, single run (what CI runs) | | `yarn typecheck:scripts` | type-checks the `scripts/` toolshed (it's outside the build graph) | | `yarn lint` | repository lint, including spelling | | `yarn lint:spelling` | checks repository spelling with the local Rust-based `typos` binary | | `yarn lint:spelling:fix` | applies unambiguous spelling corrections | | `yarn workspace @mailwoman/docs start` | the docs site at http://localhost:7770 | `yarn install` downloads the `typos` binary through `@ocular-d/typos-bin`; a Rust toolchain isn't required. The wrapper supports Linux and macOS on x64 and arm64. CI runs spelling through `yarn lint`. `typos.toml` selects American English and checks authored source, comments, documentation, and filenames, including hidden configuration. Git-ignored files, imported datasets, generated artifacts, frozen evaluations, and fixture directories are excluded. Tests outside fixture directories remain checked, with specific exceptions for malformed inputs and multilingual source values. Review the diff after `yarn lint:spelling:fix`. Preserve geographic names, external names, wire identifiers, quotations, and expected fixture values. Prefer an exact identifier or literal exception. Use accepted words only where the vocabulary is needed. File-type globs match basenames, and the most specific matching type applies. A type exception therefore also applies to another file with that basename. `typos` detects known spelling mistakes rather than rejecting every unknown word. A vitest config in `packages/core/` and `packages/neural/` aliases sibling `@mailwoman/*` imports to source, so `yarn test` runs without a precompile step. **A bare-and-subpath import failure:** when a test file imports `@mailwoman/core` _both_ bare and via a subpath, Vite can leave the bare re-exports unbound and a base class evaluates as `undefined`. The fix is a side-effect `import "@mailwoman/core"` at the top of the test file. `AGENTS.md` documents this under the bare/subpath import cycle. ## Local CLI use After `yarn compile`: ```sh node packages/mailwoman/out/cli/main.js parse "1600 Amphitheatre Parkway, Mountain View, CA 94043" node packages/mailwoman/out/cli/main.js --help ``` ## Commits and pull requests - **Branch off `main`.** Open the PR against `main`. - **Conventional commits.** Match the existing history: `feat(scope): …`, `fix(scope): …`, `refactor(scope): …`, `docs(scope): …`, `chore(scope): …`. - **The pre-commit hook** (Husky + lint-staged) runs oxlint and oxfmt on your staged files. Let it run. It catches the formatting and type drift that CI would otherwise bounce. It only checks staged files, so for a change that spans packages, run the full `yarn ci:test` before pushing. - **CI must be green** — the Test and Docs workflows run on every push. A red Docs build means an MDX syntax slip. A red Test build is a real failure. - Keep PRs focused. One concept per PR is much easier to review (and to revert). ## Where to read next - [`AGENTS.md`](./AGENTS.md) — architecture, workspace conventions, the release pipeline, and the required gotchas. - [`docs/engineering/CONTRIBUTING_MODEL_WORK.mdx`](./docs/engineering/CONTRIBUTING_MODEL_WORK.mdx) — the model-work runbook: which evals a change must pass, how to add a training-data subset. - [`docs/records/site-2026-08/concepts/what-mailwoman-is.mdx`](./docs/records/site-2026-08/concepts/what-mailwoman-is.mdx) — what the system _is_, if you're new to the project. Questions that don't fit an issue? hello@sister.software.