# Lockfile

URL: /code/project-structure/lockfile · Id: `convention:lockfile`

> The lockfile pins each Startup Template and Product Template a Startup extends to a Version by fingerprint, so upgrades arrive as reviewed Changes.

The lockfile pins each [Startup Template](/business/nouns/startup-template) and [Product Template](/business/nouns/product-template) a [Startup](/business/nouns/startup) extends to a [Version](/business/nouns/version) by fingerprint, so upgrades arrive as reviewed [Changes](/business/nouns/change).

| Property | Value |
| --- | --- |
| Path | `startups.lock` |
| Holds | [Version](/business/nouns/version) |
| Kind | file |
| Leaders | db-first, git-first |
| Team | [Engineering Team](/agents/engineering) |
| Written by | [Template.extend](/business/nouns/template/extend), [Template.upgrade](/business/nouns/template/upgrade) |
| Compiled by | [StartupBuilder](/code/builders/startup) |

### Example
`startups.lock` in a Startup repository.

```json title="startups.lock"
{
  "lockfileVersion": 1,
  "pins": {
    "agent-run-services": { "version": 4, "digest": "sha256:7be2c09d" },
    "services-as-software": { "version": 11, "digest": "sha256:e1a6f3b8" }
  }
}
```

### Props
The keys the file takes.

| Prop | Type | Required | Description |
| --- | --- | --- | --- |
| `lockfileVersion` | `number` | Yes | The format version: `1`. |
| `pins` | `json` | Yes | One pin per Startup Template or Product Template the Startup extends, keyed by its id. |
| `version` | `number` | No | Inside a pin: the pinned Version. |
| `digest` | `string` | No | Inside a pin: `sha256:` over the Version’s parsed canonical form. |

### Generates
[StartupBuilder](/code/builders/startup) compiles it into these records, Verbs and routes.

| Kind | What |
| --- | --- |
| Records | [Version](/business/nouns/version) |
| Verbs | [Template.extend](/business/nouns/template/extend), [Template.upgrade](/business/nouns/template/upgrade) |
| Routes | None. |