# Your first goal

> The demo path from an empty chat to a pull request: connect your code, set a goal for the Coder, and review the pull request it opens.

This page walks you through one complete flight: you set a goal, the Coder works in its own workspace, and it opens a pull request for you to review. It takes a few minutes of your attention. The Coder does the rest.

## Preflight checklist

- [ ] You are [signed in](/docs/getting-started/sign-in).
- [ ] You have a repository on GitHub, GitLab, or Bitbucket that you are happy for the Coder to work on. A small or test repository is a good first choice.
- [ ] You can create an access token on that service, or already have one.
- [ ] You can sign in to StellarFirm, on stellarfirm.ai or in the desktop app.

## Step 1: Connect your code first

The Coder cannot work on a repository it cannot see, so connect your source control before your first goal. [Connect your code](/docs/getting-started/connect-your-code) has the full checklist and the permissions side by side.

1. In StellarFirm, open **Integrations**.
2. Choose **GitHub**, **GitLab**, or **Bitbucket**.
3. Create an access token on the service with the permissions its page lists, and paste it into StellarFirm.
4. Press **Connect**. The integration shows as connected.

> [!NOTE]
> In cloud mode, the token is stored encrypted in StellarFirm cloud and never shown back to you. The Coder clones, reads, and pushes its own branch on its own. See [security](/docs/trust/security).

Your other tools, such as Slack, Gmail, and Linear, also connect under Integrations. Each tool's page says how it signs in. See [integrations](/docs/integrations).

## Step 2: Open chat and set a goal

1. Open the chat at [stellarfirm.ai/app](https://stellarfirm.ai/app).
2. Write your goal and name the Coder at the start. Name the repository, say what you want, and say what "done" looks like.

```prompt title="Your first goal"
Coder, in [repository], fix [the problem or small feature you want]. Keep the change small, run the tests, and open a pull request for review. Tell me what you changed.
```

Naming the Coder sends the message straight to it. Without a name, the CEO assistant picks the right assistant for you. Today that is the Coder. See [routing](/docs/ceo/routing).

## Step 3: Watch the Coder work

The Coder works in its own private workspace, a computer of its own. You can follow along in three places.

| Where | What you see |
| --- | --- |
| Chat | Short updates: Working, then what it found, then Done. |
| [Jobs](https://stellarfirm.ai/app/jobs) | The job for this goal, and the Coder's actual changes when you expand it. |
| [Computer](https://stellarfirm.ai/app/computer) | The assistant's computer, with its files and terminal. |

While the Coder works, the terminal shows each command it runs and its output, read only. You do not need to do anything. You can leave and come back.

## Step 4: Know what would ask you

You asked for a pull request, so the Coder pushes its branch and opens it on its own. Nothing about that waits for you. The Coder asks only before something that reaches other people, goes live, is deleted or closed, or spends your money, such as a merge or a deploy. A request like that appears on [Approvals](https://stellarfirm.ai/app/approvals) and under the messages in chat, with **Approve** and **Reject**.

> [!IMPORTANT]
> What happens after the work depends on your [house rules](/docs/ceo/house-rules): the rules in your company brief plus what you allow without asking. On a first run, the pull request is a draft by default, and that is fine.

## Step 5: Get your pull request

When the work is done, the Coder pushes its work to a new branch and opens a pull request on your repository, then posts the link in chat. By default, a first-run pull request is a draft, so it waits for your review.

### What to check in the pull request

1. **The title and description.** Do they say what you asked for?
2. **The changed files.** Is the change small and in the right place? Anything unexpected is worth a question.
3. **The tests.** Did they run, and do they pass? The description reports what the Coder ran.
4. **The branch.** Is it a new branch and not your main branch?
5. **Your own review.** Read the diff the way you would read a teammate's.

If something is off, reply in chat and ask the Coder to adjust it.

```prompt title="Ask for a change"
Coder, on the pull request you just opened, [what to change]. Update the same branch and tell me when it is ready.
```

## What to try next

- Ask the Coder to review an open pull request.
- Hand it a bug with a clear symptom.
- Write a company brief and house rules so every assistant knows how you work.
- Run several Coders at once on different goals.

```prompt title="Review a pull request"
Coder, review pull request [number] on [repository]. Summarise what it changes, flag risks, and list anything missing from the tests. Do not change the code.
```

```prompt title="Fix a bug"
Coder, users report that [symptom] on [repository]. Find the cause, fix it in the smallest change, add a test if one is missing, and open a pull request for review.
```

```prompt title="Ask what is possible"
CEO, what can the Coder do for me with [repository] right now, and what would you suggest I hand over first?
```

## Checkpoint

You have finished the flight when you have:

- connected a source control integration,
- set a goal and watched the job run,
- and reviewed a pull request.

## Next

- Learn how the CEO assistant plans work: [How the CEO works](/docs/ceo/how-the-ceo-works).
- Decide what the assistants may do without asking: [House rules](/docs/ceo/house-rules).
- Copy more goals from the [CEO prompt guide](/docs/ceo/prompt-guide).

---

Source: https://stellarfirm.ai/docs/getting-started/first-goal
