> ## Documentation Index
> Fetch the complete documentation index at: https://cofounder.appeeky.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Goals & OKRs

> Give your co-founder a north star. Every run prioritizes actions by contribution to your goals, tracks pace against the deadline, and pings you when one drifts off track.

Most agents optimize whatever moved that day. A real co-founder optimizes toward the **outcome you actually care about** — "\$10k MRR by end of Q3", "10,000 downloads before launch week". Goals give the agent that north star and hold both of you accountable to it.

## Setting a goal

**Dashboard → Co-founder → Settings → Goals → New goal.** A goal is a target metric with a deadline:

| Field        | Notes                                                                  |
| ------------ | ---------------------------------------------------------------------- |
| **Scope**    | `app` (one app) or `portfolio` (all your apps)                         |
| **Metric**   | `mrr`, `revenue` (7d), `downloads` (7d), `dau`, `ltv_cac`, or `custom` |
| **Target**   | The number you're aiming for                                           |
| **Deadline** | The date you want to hit it                                            |
| **Baseline** | Optional starting value — pace is measured from here                   |
| **Label**    | Optional human name, e.g. "Q3 MRR"                                     |

You can create, edit, and archive goals from the UI or the [Goals API](../api/goals).

## How the agent uses it

Goals plug into all three stages of the [pipeline](../concepts/how-it-works):

1. **Reasoner context** — active goals + their *authoritative* pace are injected into the prompt every run. The numbers are computed, not model-generated, so the agent narrates but never invents progress.
2. **Goal-first prioritization** — the agent ranks its `prioritizedActions` by contribution to the nearest goal and fills in a short `goalContribution` note on each (shown under the action in the report).
3. **Briefing section** — when goals are active, the briefing opens a `🎯 Toward your goal` line summarizing where you stand.

## Pace tracking

After each run's report is saved, app-scoped goals whose metric maps to a report value **auto-update** and re-check pace:

* `downloads` ← `health.downloadsLast7d`
* `revenue` ← `health.revenueLast7d`

Other metrics (`mrr`, `dau`, `ltv_cac`, `custom`) are updated manually — edit the goal's *current value* in the UI or via the API.

Pace is a transparent linear model: are you ahead of the straight line from baseline → target over the goal's lifetime?

```
progressFraction = (current − baseline) / (target − baseline)
timeFraction     = elapsed / total lifetime
onTrack          = progressFraction ≥ timeFraction − 0.1   (10% tolerance)
```

The list endpoint returns a computed `pace` object per goal:

```jsonc theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "progressFraction": 0.42,      // 42% of the way to target
  "timeFraction": 0.55,          // 55% of the timeline elapsed
  "projectedValue": 7600,        // linear projection at the deadline
  "onTrack": false,
  "daysToDeadline": 38,
  "projectedMissDays": 21        // ~21 days late at the current rate
}
```

## Off-track signals

When a goal crosses **from on-track into off-track**, the agent emits a [`goal_offtrack` signal](../concepts/signals) — once, on the transition, so you're not nagged daily:

* Severity is `high` when ≤14 days remain, otherwise `medium`.
* The signal can wake up an event-driven run focused on recovering the goal.
* If the goal later recovers to on-track, the flag clears so a future slip can signal again.

```
Goal "Q3 MRR" is off track: 42% to target with 38 days left
— projected to miss the deadline by ~21 days.
```

## Where you see goals

* **Settings → Goals** — create/edit/archive, with a live progress bar and pace per goal
* **Co-founder hub** — a compact "Goals" panel with progress bars for your active goals
* **Briefings** — the `🎯 Toward your goal` section + `goalContribution` on each prioritized action
* **Signals** — `goal_offtrack` events when a goal slips

## Notes & edge cases

* **Archiving never deletes.** `DELETE /goals/:id` sets status to `archived` — history in `cofounder_goal_progress` is preserved.
* **Portfolio goals** are not updated by a single app's report; they're maintained at the portfolio level.
* **Best-effort updates.** Goal progress updates never throw into the run pipeline — a goals failure can't break a briefing.
* **No baseline?** Baseline defaults to `0`, so `progressFraction` is measured from zero.
