# Repositories

URL: /code/systems/repositories · Id: `system:repositories`

> Repositories holds a Startup’s code and definitions in db.sb, with branches, Changes, checks and Versions.

Repositories holds a [Startup](/business/nouns/startup)’s code and definitions in [db.sb](/code/platform/db-sb), with branches, [Changes](/business/nouns/change), checks and [Versions](/business/nouns/version). db.sb is always the record: a GitHub repository mirrors it, or sends its edits back as Changes.

## Summary
| Part | This System |
| --- | --- |
| Group | Moves to Code |
| Status | Live |
| Shelf | Front: offered from a Startup’s first days |

You can ask:

- “Ship my changes”
- “Undo the last deploy”
- “Review this change before it merges”

## What you get
| Part | This System |
| --- | --- |
| Starts | On for every Startup at creation, with nothing to install. |
| Built from | [Database](/code/platform/capabilities/database), [Functions](/code/platform/capabilities/functions), [Event streams](/code/platform/event-streams) |

## Nouns it owns
| Noun | Definition |
| --- | --- |
| [Change](/business/nouns/change) | A Change is a proposed set of writes to definitions, previewed on its own branch, checked, approved, and merged as one unit. |
| [Version](/business/nouns/version) | A Version is an immutable build of a definition at a fingerprint; an Order keeps the Offer Version it bought. |

## Verbs
| Verb | Object | Approval | Event |
| --- | --- | --- | --- |
| [Change.review](/business/nouns/change/review) | [Change](/business/nouns/change) | None | [`Change.reviewed`](/business/events/Change.reviewed) |
| [Change.merge](/business/nouns/change/merge) | [Change](/business/nouns/change) | None | [`Change.merged`](/business/events/Change.merged) |
| [Change.revert](/business/nouns/change/revert) | [Change](/business/nouns/change) | None | [`Change.reverted`](/business/events/Change.reverted) |
| [Version.deploy](/business/nouns/version/deploy) | [Version](/business/nouns/version) | Asks first | [`Version.deployed`](/business/events/Version.deployed) |

## Events
| Direction | Event | How |
| --- | --- | --- |
| Emits | [`Change.reviewed`](/business/events/Change.reviewed) | By [Change.review](/business/nouns/change/review) |
| Emits | [`Change.merged`](/business/events/Change.merged) | By [Change.merge](/business/nouns/change/merge) |
| Emits | [`Change.reverted`](/business/events/Change.reverted) | By [Change.revert](/business/nouns/change/revert) |
| Emits | [`Version.deployed`](/business/events/Version.deployed) | By [Version.deploy](/business/nouns/version/deploy) |

## States
None.

## Who operates it
| Part | This System |
| --- | --- |
| Accountable | [Engineering Lead](/agents/engineering/engineering-lead) |
| Team | [Engineering Team](/agents/engineering) |
| Seat | A role agent holds it until a Human is seated. |
| Autonomy | `supervised` |
| Also calls its Verbs | [Reliability Engineer](/agents/engineering/reliability-engineer), [Quality Lead](/agents/quality/quality-lead) |

## Approvals and limits
| Verb | Rule | Detail |
| --- | --- | --- |
| [Version.deploy](/business/nouns/version/deploy) | A person says yes first | None. |
| [Version.deploy](/business/nouns/version/deploy) | Limit for the [Engineering Lead](/agents/engineering/engineering-lead) | 20 calls per day |
| [Change.merge](/business/nouns/change/merge) | Mandate `ship` for the [Engineering Lead](/agents/engineering/engineering-lead) | Merges passing Changes and reverts failing ones without asking. |
| [Change.revert](/business/nouns/change/revert) | Mandate `ship` for the [Engineering Lead](/agents/engineering/engineering-lead) | Merges passing Changes and reverts failing ones without asking. |

## Processes that use it
| Process | How it uses it |
| --- | --- |
| [Iteration](/workflows/processes/iteration) | A Workflow writes [Change](/business/nouns/change) |
| [Shipping](/workflows/processes/shipping) | A Workflow writes [Change](/business/nouns/change) |
| [Release](/workflows/processes/release) | A step calls [Change.merge](/business/nouns/change/merge) |
| [Incident response](/workflows/processes/incident-response) | A step calls [Change.revert](/business/nouns/change/revert) |
| [Verification](/code/verification) | A step calls [Change.review](/business/nouns/change/review) |
| [Vulnerability disclosure](/workflows/processes/vulnerability-disclosure) | A Workflow writes [Change](/business/nouns/change) |
| [Barrier reports](/workflows/processes/barrier-reports) | A Workflow writes [Change](/business/nouns/change) |

## Rail underneath
None.

## Views and dashboards
| View | Shows | Metrics |
| --- | --- | --- |
| The [Engineering Lead](/agents/engineering/engineering-lead)’s view | The Metrics its accountable Role answers for. | [Change lead time](/agents/engineering#change-lead-time) |

## Access
What each Access level may call here.

| Access level | May call |
| --- | --- |
| `owner` | Every Verb (9) |
| `admin` | Every Verb (9) |
| `member` | Every Verb (9) |
| `viewer` | Read only (4 of 9) |

## Import and export
| Connector | Mode |
| --- | --- |
| GitHub | Mirror: the db.sb record leads and the tool reflects it. |
| GitHub | Import: edits made in the tool arrive as Changes. |

## Fees and pricing
None.

## Availability and limits
| Part | This System |
| --- | --- |
| Status | Live |

## Compliance notes
Controls it carries:

- [Log completeness](/systems/trust-and-governance/controls/log-completeness)
- [Vulnerability management](/systems/trust-and-governance/controls/vulnerability-management)
- [Deploy reconciliation](/systems/trust-and-governance/controls/deploy-reconciliation)
- [Append-only records](/systems/trust-and-governance/controls/append-only-records)
- [Change approval](/systems/trust-and-governance/controls/change-approval)
- [Point-in-time recovery](/systems/trust-and-governance/controls/point-in-time-recovery)
- [Processing definitions](/systems/trust-and-governance/controls/processing-definitions)

## Related Systems
None.

## Example
An [Agent as a Service](/products/templates/agent-as-a-service) for outbound sales keeps its prompts, [Skills](/business/nouns/skill) and code in one repository. A developer edits a prompt in GitHub; the edit arrives as a Change, passes its [Evals](/agents/evals-system), and merges. Deploying it creates a new Version, and the previous one stays one step away.