Skip to content

Repospec Specification — Configuration

Defines .repospec/project.yaml: the structured root artifact. This prose is authoritative; a machine-readable JSON Schema is generated from the reference implementation and published to schemas/<version>/ (ADR-0005).

1. Format

project.yaml MUST be a valid YAML 1.2 document containing a single mapping at the top level. Implementations SHOULD support an editor $schema association so authors get inline validation:

yaml
# yaml-language-server: $schema=https://raw.githubusercontent.com/npxchaos/repospec/main/schemas/0.1/project.schema.json

2. Top-level fields

FieldTypeRequiredDescription
repospecProtocolstringyesProtocol version targeted, e.g. "0.1". See versioning.md.
projectobjectyesProject identity.
stackobjectyesLanguages, runtimes, tooling.
conventionsobjectnoFormatter, linter, commit/branch style.
documentsobjectnoOverrides for prose-document paths.
agentsobjectnoWhere agent artifacts live.
rulesobjectnoWhere rule artifacts live.
adaptersarraynoTool entrypoints to generate.
pluginsarraynoDeclarative plugin references.

Unknown top-level fields MUST be ignored by implementations (forward compatibility) and MAY be warned about.

3. Field definitions

3.1 project

FieldTypeRequiredNotes
namestringyesHuman-facing project name.
descriptionstringyesOne-sentence summary.
typeenumyesapplication | library | service | cli | monorepo.
repositorystring (URL)noCanonical repository URL.

3.2 stack

FieldTypeRequiredNotes
languagesstring[]yese.g. [typescript].
runtimesstring[]noe.g. [node].
packageManagerstringnoe.g. pnpm.
frameworksstring[]noe.g. [react].
testingstring[]noe.g. [vitest].

3.3 conventions

FieldTypeNotes
formatterstringe.g. prettier.
linterstringe.g. eslint.
commitStyleenumconventional | freeform.
branchingenumtrunk | github-flow | gitflow.

3.4 documents

Overrides default prose-document paths from repository.md.

FieldTypeDefault
constitutionstringconstitution.md
architecturestringarchitecture.md
workflowstringworkflow.md

3.5 agents / rules

FieldTypeDefault
dirstringagents / rules respectively

3.6 adapters

An array of adapter selections. Each entry is either a string id or an object:

FieldTypeRequiredNotes
idstringyesAdapter identifier, e.g. claude, cursor, copilot.
optionsobjectnoAdapter-specific options.

The set of enabled adapters determines which generated outputs exist (repository.md §4).

3.7 plugins

An array of plugin references. Each entry:

FieldTypeRequiredNotes
idstringyesPlugin identifier.
versionstringnoVersion constraint.
optionsobjectnoPlugin-specific options.

An implementation MUST NOT execute a plugin unless it is approved in .repospec/plugins.lock with an integrity hash matching the resolved code and a capability the plugin's manifest declares (RFC-0001; trust model in ADR-0008, sandbox in ADR-0009). Execution is opt-in; a declared-but-unapproved plugin is inert. A plugin ships a repospec-plugin.yaml manifest at .repospec/plugins/<id>/.

4. Example

yaml
# yaml-language-server: $schema=https://raw.githubusercontent.com/npxchaos/repospec/main/schemas/0.1/project.schema.json
repospecProtocol: "0.1"

project:
  name: acme-web
  description: Customer-facing storefront.
  type: application
  repository: https://github.com/acme/web

stack:
  languages: [typescript]
  runtimes: [node]
  packageManager: pnpm
  frameworks: [react]
  testing: [vitest]

conventions:
  formatter: prettier
  linter: eslint
  commitStyle: conventional
  branching: github-flow

adapters:
  - id: claude
  - id: cursor
  - id: copilot

5. Validation rules

  • repospecProtocol MUST be a version the implementation supports, else a clear error (versioning.md).
  • project.name, project.description, project.type, and stack.languages are REQUIRED and MUST be non-empty.
  • adapters[].id MUST reference an adapter the implementation knows; an unknown adapter is a warning (the repository is still valid; that output is skipped).
  • Validation errors MUST be reported path-first and human-readable (e.g. project.type: expected one of application|library|service|cli|monorepo), not as raw schema dumps.

Released under the MIT License.