.opencode/.
facets.yaml
The dependency declaration file. Specifies which facets your project uses and where they come from.Schema
Example
How it’s managed
| Action | Effect on facets.yaml |
|---|---|
facets add <url> | Adds a remote entry with the URL and version |
facets remove <name> | Removes the entry from remote or local |
facets init | Creates the file if absent |
facets update | Updates the version in the remote entry |
facets.lock
The lock file. Records exact versions and integrity hashes for reproducible installs.Schema
Example
Integrity
Theintegrity field is a SHA-256 hash of the raw manifest YAML content, formatted as sha256-<hex>. It’s computed when the manifest is first fetched (during facets add or facets update) and can be used to detect if the remote manifest has changed unexpectedly.
How it’s managed
| Action | Effect on facets.lock |
|---|---|
facets add <url> | Creates or updates the lock entry with URL, version, and integrity |
facets update <name> | Updates the lock entry if the remote version changed |
facets remove <name> | Lock entry is not removed (stale entries are harmless) |
facets cache clear | Lock file is not modified |
How they work together
facets add— Fetches the manifest, writes bothfacets.yaml(dependency) andfacets.lock(exact version + hash)facets install— Readsfacets.yamlto find declared facets, resolves from local or cache, installs resources. Does not modify either file.facets update— Re-fetches from the URL infacets.yaml, compares againstfacets.lockto detect changes, updates both files.facets remove— Removes fromfacets.yamlonly. Lock file entries persist but are inert.