Skip to content

Commit 44ca42f

Browse files
committed
fix: remove --change from templates command
Templates are schema-level, not change-level. The command now uses --schema instead of --change for consistency with how templates are actually resolved.
1 parent 39645d9 commit 44ca42f

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

openspec/changes/add-artifact-workflow-cli/design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Commands are top-level for maximum fluidity:
2828
openspec status --change <id>
2929
openspec next --change <id>
3030
openspec instructions <artifact> --change <id>
31-
openspec templates --change <id>
31+
openspec templates [--schema <name>]
3232
openspec new change <name>
3333
```
3434

openspec/changes/add-artifact-workflow-cli/proposal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This proposal adds CLI commands that expose the artifact workflow functionality
1313
- **NEW**: `openspec status --change <id>` shows artifact completion state
1414
- **NEW**: `openspec next --change <id>` shows artifacts ready to create
1515
- **NEW**: `openspec instructions <artifact> --change <id>` outputs enriched template
16-
- **NEW**: `openspec templates --change <id>` shows resolved template paths
16+
- **NEW**: `openspec templates [--schema <name>]` shows resolved template paths
1717
- **NEW**: `openspec new change <name>` creates a new change directory
1818

1919
All commands are top-level for fluid UX. They integrate with existing core modules:

openspec/changes/add-artifact-workflow-cli/specs/cli-workflow/spec.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,18 @@ The system SHALL output enriched instructions for creating an artifact.
7474
- **THEN** the system displays instructions with a warning about missing dependencies
7575

7676
### Requirement: Templates Command
77-
The system SHALL show resolved template paths for all artifacts.
77+
The system SHALL show resolved template paths for all artifacts in a schema.
7878

79-
#### Scenario: List template paths
80-
- **WHEN** user runs `openspec templates --change <id>`
81-
- **THEN** the system displays each artifact with its resolved template path
79+
#### Scenario: List template paths with default schema
80+
- **WHEN** user runs `openspec templates`
81+
- **THEN** the system displays each artifact with its resolved template path using the default schema
82+
83+
#### Scenario: List template paths with custom schema
84+
- **WHEN** user runs `openspec templates --schema tdd`
85+
- **THEN** the system displays template paths for the specified schema
8286

8387
#### Scenario: Templates JSON output
84-
- **WHEN** user runs `openspec templates --change <id> --json`
88+
- **WHEN** user runs `openspec templates --json`
8589
- **THEN** the system outputs JSON mapping artifact IDs to template paths
8690

8791
#### Scenario: Template resolution source

0 commit comments

Comments
 (0)