# Your first pull request

> Get the repository, make one change, run the checks a reviewer runs, sign the contributor licence agreement once and open a pull request that gets merged.

You will take one small change from your machine to a merged pull request: a branch, the same checks the CI runs, a signed contributor licence agreement, and a description a reviewer can trust. Small fixes come straight here; a feature or a change to a standard starts with an issue (see [Ways to contribute](https://docs.altasystem.ai/contribute/)).

**Before you begin (20 minutes, most of it the checks)**

- Node 20 or later, and git.
- Google Chrome, for the browser tests.
- On a Mac, zsh (already there), for the engine's tests.
- A fork of the repository on GitHub.

### Get the code

Clone your fork and install the dependencies. Nothing here signs in or changes your machine outside the folder.

```sh [Terminal]
git clone https://github.com/<you>/alta-os.git
cd alta-os
npm install
git checkout -b fix-the-thing
```

### Make the change

Keep it to one concern. Three rules catch most first pull requests:

- **The standard comes first.** If your change is about what a chart, a quest or a universe can say, read its page under [Reference › Standards](https://docs.altasystem.ai/reference/standards/). A new field or rule is a [change to a standard](https://docs.altasystem.ai/contribute/standards).
- **Tests use fakes.** Tests run with a temporary home folder, the fake programs of the repository and `WORLD_SANDBOX=1`. Never write to a real `~/.openclaw` or `~/.config/alta`, and never weaken a fake to make a test pass.
- **Two languages.** A text a player or an author reads exists in English and in French ("tu").

Generated files (the reference pages of these docs, the JSON schemas) are regenerated, never edited by hand: `npm run docs:gen`. Do not edit `CHANGELOG.md`: it is written at release time.

### Run the checks

These are the checks the CI runs. Run them before you push: a reviewer asks for their output.

```sh [Terminal]
npm run build
npx tsc --noEmit
npx vitest run
npm run check:content
npm run docs:build
zsh engine/tests/run.sh
npx playwright test --trace off
```

`check:content` runs `alta lint` on every file of the repository; `docs:build` fails on a dead link or a stale generated page. The browser tests start two local servers: if their ports are taken, pick two free ones with `WORLD_E2E_PORTS=8841,8842 npx playwright test --trace off`.

### Sign the contributor licence agreement, once

Before your first pull request is merged, read the [contributor licence agreement](https://github.com/altasystem-ai/alta/blob/main/CLA.md) and sign it: you keep your copyright and give Alta System the rights to ship your change under the repository's licences. Signing is one entry in `.github/cla/signatures.json`, added in your pull request. Only a digest of your commit e-mail is stored, never the address:

```sh [Terminal]
node scripts/ci/check-cla.mjs --hash "$(git config user.email)"
```

Write the printed value as `email_sha256` in your entry, with your GitHub handle, `"kind": "individual"`, `"version": "1.0"` and the date. A check refuses a pull request with a commit whose author has not signed. Contributing for a company? It signs the corporate agreement once for its employees.

### Open the pull request

Push the branch and open the pull request on GitHub. The template asks for five things:

1. **What problem this solves**, and the issue it closes (`Closes #123`).
2. **What changed**, in a few lines.
3. **Evidence**: the commands you ran and the end of what they printed; a screenshot for anything a person sees.
4. **The standard** you read, and whether you changed one.
5. **Contributor licence agreement**: the box that says you signed it.

If you changed a published package (the SDK, the UI components, the CLI), add a changeset with `npm run changeset`; the CI reminds you.

## What happens next

A maintainer of the area reviews it (see [How decisions are made](https://docs.altasystem.ai/contribute/governance)). Changes to security-sensitive code (the executors, the sign-ins, the server's HTTP and secrets code, the engine installer, the CI files, the lock file, the fakes) need a second maintainer. An automated reviewer may comment when a maintainer asks for it: it gives advice, it never approves or merges. Pull requests are squash-merged.

Written with an AI assistant? Welcome, under the same bar: you are the author, you read every line, and the evidence shows the checks you ran yourself.

**Next:**

- [Improve the docs](https://docs.altasystem.ai/contribute/docs)
- [Propose a change to a standard](https://docs.altasystem.ai/contribute/standards)
- [Errors of alta lint](https://docs.altasystem.ai/reference/errors)
