Skip to Content
OpenSpec
ReferenceConfiguration

Project configuration (config.yaml)

Every field of openspec/config.yaml: the schema, context, and rules this project plans with.

Location

Each OpenSpec project keeps its config file at openspec/config.yaml, in the project root.

Fields

KeyTypeRequiredEffect
schemastringYesThe workflow schema this project's changes follow
contextstringNoInjected into every artifact, apply, and archive
rulesmap: artifact ID → list of stringsNoExtra rules added to one artifact's built-in guidance
operationsmap: operation → guidance listNoAdvisory guidance for apply and archive work
storestringNoFallback OpenSpec root when this openspec/ is config-only
referenceslistNoStores whose specs are indexed into instructions
skillsScopestring: projectNoThe team keeps OpenSpec's skills in this repo

Invalid fields never fail a command. Each field is validated on its own, and a bad value is dropped with a warning. A file that cannot be read or is not valid YAML is ignored with a warning, except by openspec validate, which exits 1 so CI catches it.

What to write in these fields is covered in Project configuration.

schema

The workflow schema every change in this project follows. Valid values are spec-driven or a schema name the project defines. Run openspec schemas to list the available schema names.

context

Free text injected into every artifact's instructions and supplied to apply and archive. The limit is 50KB, and a larger value is ignored with a warning.

rules

Extra rules for one artifact, added to the schema's built-in guidance:

rules:
  proposal:
    - Keep proposals under 500 words

Artifact IDs are not restricted to the built-in names, so artifacts from custom schemas work as keys.

operations

Advisory guidance for how apply and archive work is conducted, separate from artifact rules:

operations:
  apply:
    guidance:
      - Keep test summaries concise

Only apply and archive are read.

store

A store id used as the OpenSpec root, consulted only when this openspec/ directory is config-only (no specs/ or changes/). It is a fallback, never an override. The full ladder is Root resolution.

references

Store ids whose specs this project's work draws on. An index of each store's specs (id, summary, fetch command) is added to instructions output. Spec content is never inlined, and root resolution is never affected. An entry is a store id or a map with id and an optional remote clone source:

references:
  - platform-specs
  - id: billing-specs
    remote: git@github.com:acme/billing-specs.git

skillsScope

skillsScope: project records that your team keeps OpenSpec's skills in this repo. openspec update writes it when you choose Keep in this project, and it stops asking once the file is committed and pulled. To move the repo to the global skills later, run openspec init --scope global, which also removes this line. Removing the line by hand moves nothing: update asks the question again.

Example

A filled-in config.yaml:

schema: spec-driven

context: |
  Designs and tasks must cover Windows, macOS, and Linux
  Write all artifacts in Spanish

rules:
  proposal:
    - Keep proposals under 500 words
    - Always state what is out of scope
  tasks:
    - Break tasks into chunks of max 2 hours

operations:
  apply:
    guidance:
      - Keep test summaries concise
  archive:
    guidance:
      - Summarize the archive outcome before finishing

Legacy names

openspec/config.yml is read as an alias when config.yaml does not exist. When both files exist, config.yaml wins and config.yml is ignored. openspec init creates config.yaml.

On this page