Contributing
Thanks for helping. This file covers contributing to the template itself; AGENTS.md holds the rules for code written in it, and applies here too. Everyone taking part follows the code of conduct.
Before you start
Section titled “Before you start”- Bugs: open an issue with the steps to reproduce, the platform and the versions (
npx react-native info). - Changes to a decision (a library, a pattern, a convention): open an issue first. Decisions are recorded in docs/decisions/; a change gets a new ADR rather than an edit to the old one.
- Security issues: don’t open an issue; see SECURITY.md.
Making a change
Section titled “Making a change”pnpm installbundle installpnpm check # types, lint, format, boundaries, tests- Use Conventional Commits (
feat:,fix:,docs:…); commitlint checks them on commit. - Mark demo-only code with
// @example(AGENTS.md › Demo code) and runscripts/ci/check-strip-examples.sh, sopnpm strip-exampleskeeps working. - Changed something the generators produce (a convention, a primitive, the folder layout)? Update
scripts/generate.tsand theadd-*skills in.claude/skills/to match. - Native change: mark it
[bareship]and add a row to docs/native-changes.md. - New dependency: check it against docs/version-matrix.md and record it there.
- Touched packaging (
template.config, dotfiles, the name placeholder)? Runscripts/ci/check-template-init.sh(docs/packaging.md). - Releasing a new version to npm: maintainers follow docs/packaging.md › Publish.
Fill in the pull request template: what changed, and how you tested it (which platforms, which devices).
Editing the website
Section titled “Editing the website”The website (website/, Astro Starlight) is built from the repo’s own docs, so most pages are edited where
they already live:
| Page | Edit |
|---|---|
| Environments, Architecture, Generators, Going live, Releasing, Demo build, Native changes, Version matrix, Best-practices audit | The file in docs/ |
| Decisions | docs/decisions/ |
| Styling, Testing, Project rules | The matching section of AGENTS.md |
| Contributing, Changelog | CONTRIBUTING.md, CHANGELOG.md |
| Home, Introduction, Quick start, FAQ, Offline, Built for AI agents | website/content/ |
Every page’s Edit page link opens the right file. website/src/content/docs/ is generated: changes there
are overwritten.
pnpm site:dev # http://localhost:4321, updates as you edit docs/, AGENTS.md or website/content/pnpm site:build # the site in website/dist/, then the link check- Add a page from
docs/: add it toPAGESinwebsite/scripts/sync-docs.mjsand to the sidebar inwebsite/astro.config.mjs. A page written only for the site goes inwebsite/content/and the sidebar. - Links: link between docs with relative paths (
going-live.md#use-your-api) as usual; the site rewrites them.pnpm site:buildfails and names the link when one points to a missing page or heading, so run it after renaming a file or rewording a heading. - Frontmatter: quote a
descriptionthat contains a colon, or the build fails. - If
pnpm site:devkeeps showing an error you’ve fixed, restart it withpnpm site:dev --force.
License
Section titled “License”By contributing you agree that your contribution is licensed under the MIT License.