# Your first goal

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

This page walks you through one complete flight: you set a goal, the Coder works in its own workspace, the CEO assistant brings the risky step to you, you approve it, and you get a pull request. 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 have the StellarFirm desktop app, where code hosts are connected today.

## 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 the StellarFirm desktop app, 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]
> The desktop app saves the token on your computer and never shows it back to you. Connecting from stellarfirm.ai is Coming soon. See [security](/docs/trust/security).

GitHub, GitLab, and Bitbucket are the integrations available today. Everything else, such as Slack and Gmail, is Coming soon.

## 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: Approve the risky step

Editing files in the Coder's workspace is safe, so it does not stop you. Opening a pull request affects your repository, so the CEO assistant holds it for you.

1. Open [Approvals](https://stellarfirm.ai/app/approvals), or look for the request under the messages in chat.
2. Read the request. It says what the assistant wants to do and where.
3. Choose **Approve** to let it go ahead, or **Reject** to stop it. Nothing is sent if you 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. The CEO approves risky steps as those rules require. On a first run, the pull request is a draft by default, and that is fine.

## Step 5: Get your pull request

After you approve, 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,
- approved a step on Approvals,
- 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
