Contributor guide
Thanks for helping with Commitment Desk Inbox. This project is an open-source, office-side capture inbox for assessing practices. Please read the project overview before proposing a feature; the milestones and the open-core boundary are deliberate.
Ground rules
Section titled “Ground rules”- Use synthetic data only. Never commit real taxpayer data, private prospect notes, client documents, credentials, or screenshots containing them.
- Keep the open-source core free of paid-service dependencies and Cloudflare-specific imports outside the adapters.
- Open an issue before large changes so the approach can be agreed on.
- Report security issues privately as described in
SECURITY.md, not in a public issue. - Be respectful. See
CODE_OF_CONDUCT.md.
Development setup
Section titled “Development setup”Requirements: Node.js 22.20+ and pnpm 11.
corepack enablepnpm installpnpm seedpnpm typecheckpnpm testpnpm devpnpm dev serves the reviewer inbox at http://localhost:5173 and the API at
http://localhost:8787. The web dev server proxies /v1/* to the API. pnpm seed applies D1
migrations and writes a local demo API key, reviewer email, and state file (.local-demo.json,
gitignored). With the API running, pnpm demo:capture uploads a synthetic photo and submits a capture.
CI also runs a full-history secret scan, audits production dependencies, and checks dependency
licenses. Run pnpm audit:prod and pnpm licenses:check after changing dependencies.
Open the web app and sign in with [email protected]; the magic link appears in the API
terminal and as a local development link on the login screen. needs_match captures show a parcel
panel: search the capture’s town for an existing parcel or create one, then match it. After matching,
accept the capture, return it, reject it, or request information. Every action appears in the audit
timeline with the reviewer and reason.
For admin screens, sign in with [email protected]. The admin account can create towns, create and
CSV-import parcels, and create or revoke capture API keys. Raw API keys are shown once; copy them
before dismissing the panel.
The M1 acceptance check runs against Miniflare D1/R2 with synthetic data and prints the stored capture, status, attachment hash, and event:
pnpm test:acceptanceThe reviewer happy path runs in Chromium against the local API and web app:
pnpm exec playwright install chromiumpnpm test:e2epnpm test:e2e seeds synthetic data first, starts the dev servers when they are not already running,
and provisions its own uniquely named captures. It covers magic-link login, inbox search, parcel
creation, existing-parcel matching, accept, return with a reason, and the audit timeline. The suite also verifies role-aware navigation and deep links, narrow-screen
table scrolling, session states, keyboard focus, and appearance persistence and contrast across the
four palettes. It is local-only and uses synthetic data.
To exercise the production bundling path locally:
pnpm buildThe public documentation site lives in apps/docs. It is generated from curated public Markdown:
pnpm docs:dev # local site on http://127.0.0.1:4321pnpm docs:check # required pages, navigation, and internal linkspnpm docs:build # static buildpnpm test:e2e:docs # keyboard, search, and responsive browser checksSee the documentation site runbook before changing the curated source list or deployment workflows.
Making a change
Section titled “Making a change”-
Create a branch from
main. -
Write or update tests with the implementation.
-
Run the full check set before pushing:
Terminal window pnpm formatpnpm lintpnpm typecheckpnpm testpnpm spec:validatepnpm docs:checkpnpm build -
Commit with a conventional commit message, signed off under the DCO (see below).
-
Open a pull request describing the change, the tests run, and any milestone or contract impact.
Keep pull requests focused. Add an ADR under docs/adr/ when a change deviates from
the project overview or makes a durable architectural decision.
Planning with OpenSpec
Section titled “Planning with OpenSpec”Non-trivial changes start as an OpenSpec change proposal. The CLI is pinned as a root dev dependency
and the workflow skills are committed under .agents/skills/.
pnpm exec openspec listpnpm exec openspec status --change <name>pnpm spec:validateUse /openspec or /openspec-propose in your agent, review the generated artifacts in
openspec/changes/<name>/, then implement and archive. Update openspec/specs/ only through the
archive or sync workflow so the specs stay a record of behavior that actually shipped.
If you upgrade the OpenSpec CLI, refresh and commit the skills:
pnpm add -Dw @fission-ai/openspec@<version>pnpm exec openspec updateDo not hand-edit generated files in .agents/skills/.
Developer Certificate of Origin
Section titled “Developer Certificate of Origin”This project uses the Developer Certificate of Origin instead of a contributor license agreement. Sign off every commit:
git commit -s -m "feat(api): add health endpoint"The sign-off certifies that you wrote the change or otherwise have the right to submit it under the
project’s Apache 2.0 license. Commits without a valid Signed-off-by trailer may be rejected.
Commit messages
Section titled “Commit messages”Use Conventional Commits:
feat(api): add capture submission endpointfix(web): keep status dot visible in dark modedocs: document the self-host boundarychore(ci): cache the pnpm storeCommon scopes: api, web, schema, core, infra, docs, ci.
Code conventions
Section titled “Code conventions”- TypeScript is strict, including
noUncheckedIndexedAccessandexactOptionalPropertyTypes. - Keep API request and response contracts in
packages/capture-schema; do not duplicate types in the apps. - Keep domain use cases independent of Cloudflare APIs through the interfaces listed in the project overview §6.
- Add tests for behavior, not implementation details.
- Formatting and lint rules are enforced in CI.
Pull request checklist
Section titled “Pull request checklist”- Tests cover the new behavior.
-
pnpm lint,pnpm typecheck,pnpm test,pnpm build, andpnpm spec:validatepass. -
pnpm test:e2epasses when the change touches the reviewer browser flow. -
pnpm test:selfhostpasses when the change touches API contracts, storage, webhooks, retention, or the Node adapter. - No real taxpayer or client data is included.
- Public contracts and documentation are updated.
- An ADR is added if the change deviates from the plan.
- Commits are signed off (
git commit -s).