Skip to content

Commit 276ab36

Browse files
committed
chore: archive restructure-schema-directories change
1 parent 9cc4aba commit 276ab36

5 files changed

Lines changed: 25 additions & 2 deletions

File tree

openspec/changes/restructure-schema-directories/design.md renamed to openspec/changes/archive/2025-12-28-restructure-schema-directories/design.md

File renamed without changes.

openspec/changes/restructure-schema-directories/proposal.md renamed to openspec/changes/archive/2025-12-28-restructure-schema-directories/proposal.md

File renamed without changes.

openspec/changes/restructure-schema-directories/specs/artifact-graph/spec.md renamed to openspec/changes/archive/2025-12-28-restructure-schema-directories/specs/artifact-graph/spec.md

File renamed without changes.

openspec/changes/restructure-schema-directories/tasks.md renamed to openspec/changes/archive/2025-12-28-restructure-schema-directories/tasks.md

File renamed without changes.

openspec/specs/artifact-graph/spec.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
TBD - created by archiving change add-artifact-graph-core. Update Purpose after archive.
55
## Requirements
66
### Requirement: Schema Loading
7-
The system SHALL load artifact graph definitions from YAML schema files.
7+
The system SHALL load artifact graph definitions from YAML schema files within schema directories.
88

99
#### Scenario: Valid schema loaded
10-
- **WHEN** a valid schema YAML file is provided
10+
- **WHEN** a schema directory contains a valid `schema.yaml` file
1111
- **THEN** the system returns an ArtifactGraph with all artifacts and dependencies
1212

1313
#### Scenario: Invalid schema rejected
@@ -26,6 +26,10 @@ The system SHALL load artifact graph definitions from YAML schema files.
2626
- **WHEN** a schema contains multiple artifacts with the same ID
2727
- **THEN** the system throws an error identifying the duplicate
2828

29+
#### Scenario: Schema directory not found
30+
- **WHEN** resolving a schema name that has no corresponding directory
31+
- **THEN** the system throws an error listing available schemas
32+
2933
### Requirement: Build Order Calculation
3034
The system SHALL compute a valid topological build order for artifacts.
3135

@@ -105,3 +109,22 @@ The system SHALL identify which artifacts are blocked and return all their unmet
105109
- **WHEN** artifact C requires A and B, and neither is complete
106110
- **THEN** getBlocked() returns `{ C: ['A', 'B'] }`
107111

112+
### Requirement: Schema Directory Structure
113+
The system SHALL support self-contained schema directories with co-located templates.
114+
115+
#### Scenario: Schema with templates
116+
- **WHEN** a schema directory contains `schema.yaml` and `templates/` subdirectory
117+
- **THEN** artifacts can reference templates relative to the schema's templates directory
118+
119+
#### Scenario: User schema override
120+
- **WHEN** a schema directory exists at `${XDG_DATA_HOME}/openspec/schemas/<name>/`
121+
- **THEN** the system uses that directory instead of the built-in
122+
123+
#### Scenario: Built-in schema fallback
124+
- **WHEN** no user override exists for a schema
125+
- **THEN** the system uses the package built-in schema directory
126+
127+
#### Scenario: List available schemas
128+
- **WHEN** listing schemas
129+
- **THEN** the system returns schema names from both user and package directories
130+

0 commit comments

Comments
 (0)