Skip to content

Conversation

@TabishB
Copy link
Contributor

@TabishB TabishB commented Jan 6, 2026

Summary

  • Adds .openspec.yaml metadata file to each change directory, storing the workflow schema and creation date
  • Enables auto-detection of schema in CLI commands (status, instructions, new change)
  • Schema resolution order: explicit --schema flag > .openspec.yaml metadata > default spec-driven
  • Implements ChangeMetadataSchema Zod schema for validation

Changes

File Description
src/core/artifact-graph/types.ts Add ChangeMetadataSchema and ChangeMetadata type
src/utils/change-metadata.ts New file with writeChangeMetadata(), readChangeMetadata(), resolveSchemaForChange()
src/utils/index.ts Export new metadata utilities
src/utils/change-utils.ts Update createChange() to accept options with schema, write .openspec.yaml
src/core/artifact-graph/instruction-loader.ts Update loadChangeContext() to auto-detect schema from metadata
src/commands/artifact-workflow.ts Add --schema option to new change, update commands for auto-detection

Test plan

  • ChangeMetadataSchema validates correctly (valid/invalid cases)
  • writeChangeMetadata() creates valid YAML with schema and created date
  • readChangeMetadata() parses and validates schema, throws for invalid
  • loadChangeContext() auto-detects schema from .openspec.yaml
  • Fallback to spec-driven when no metadata exists
  • --schema flag overrides metadata
  • All 654 tests pass

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added schema override support when creating changes; schema auto-detects from change metadata with fallback to defaults.
    • Change metadata now tracked and stored with schema and creation date information.
  • Tests

    • Added comprehensive tests for schema detection, metadata I/O, and validation.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 6, 2026

Warning

Rate limit exceeded

@TabishB has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 7 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between d6514b4 and fcfea28.

📒 Files selected for processing (10)
  • openspec/changes/add-per-change-schema-metadata/tasks.md
  • src/commands/artifact-workflow.ts
  • src/core/artifact-graph/instruction-loader.ts
  • src/core/artifact-graph/types.ts
  • src/utils/change-metadata.ts
  • src/utils/change-utils.ts
  • src/utils/index.ts
  • test/core/artifact-graph/instruction-loader.test.ts
  • test/utils/change-metadata.test.ts
  • test/utils/change-utils.test.ts
📝 Walkthrough

Walkthrough

This PR introduces per-change schema metadata support. A new .openspec.yaml file stores schema and creation date within each change directory. The createChange function now writes metadata; loadChangeContext auto-detects schema from metadata with explicit override precedence; CLI commands accept optional schema parameters and display resolved schemas.

Changes

Cohort / File(s) Summary
Change Metadata Core Types
src/core/artifact-graph/types.ts
Added ChangeMetadataSchema (schema and created fields) and exported ChangeMetadata type for per-change metadata validation.
Change Metadata Utilities
src/utils/change-metadata.ts
New module: ChangeMetadataError, validateSchemaName(), writeChangeMetadata(), readChangeMetadata(), and resolveSchemaForChange() for metadata I/O, schema validation, and resolution (explicit > metadata > default).
Change Creation
src/utils/change-utils.ts, src/utils/index.ts
Extended createChange() with optional CreateChangeOptions parameter; writes metadata file on creation; exported new types and metadata utilities from public API.
Instruction Loading
src/core/artifact-graph/instruction-loader.ts
Updated loadChangeContext() to accept optional schemaName and resolve final schema via resolveSchemaForChange() before building artifact graph.
CLI Command Wiring
src/commands/artifact-workflow.ts
Added schema option to NewChangeOptions; refactored status, instructions, and new-change commands to pass schema to loadChangeContext() and reference resolved schema from context; updated help text and creation messaging.
Tasks & Tests
openspec/changes/add-per-change-schema-metadata/tasks.md, test/core/artifact-graph/instruction-loader.test.ts, test/utils/change-metadata.test.ts, test/utils/change-utils.test.ts
Updated task checklist; added tests for metadata YAML I/O, schema resolution precedence, metadata validation, and metadata file creation during change initialization.

Sequence Diagram(s)

sequenceDiagram
    participant User as User / CLI
    participant WF as artifact-workflow.ts
    participant CU as change-utils.ts
    participant CM as change-metadata.ts
    participant IL as instruction-loader.ts
    participant FS as Filesystem

    rect rgb(200, 220, 240)
    Note over User,FS: Create Change Flow
    User->>WF: create change (name, schema?)
    WF->>CU: createChange(projectRoot, name, {schema?})
    CU->>CM: validateSchemaName(schema || DEFAULT_SCHEMA)
    CM-->>CU: ✓ schema valid or thrown
    CU->>FS: mkdir change directory
    CU->>CM: writeChangeMetadata(changeDir, {schema, created})
    CM->>FS: write .openspec.yaml
    FS-->>CM: ✓ metadata written
    CM-->>CU: ✓ success
    CU-->>WF: ✓ change created
    WF-->>User: Display: "Change created with schema: {schema}"
    end

    rect rgb(220, 240, 200)
    Note over User,FS: Load Change Context Flow
    User->>WF: status/instructions (changeName, schema?)
    WF->>IL: loadChangeContext(projectRoot, changeName, schema?)
    IL->>CM: resolveSchemaForChange(changeDir, schema?)
    CM->>FS: read .openspec.yaml
    FS-->>CM: metadata or null
    CM-->>CM: resolve: explicit > metadata > default
    CM-->>IL: resolved schema name
    IL->>IL: build artifact graph (resolved schema)
    IL-->>WF: ChangeContext {schemaName: resolved}
    WF-->>User: Display: artifacts using resolved schema
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PR #410: Implements per-change schema metadata and resolveSchemaForChange, directly overlapping the core schema-resolution and loadChangeContext behavior introduced in this PR.
  • PR #408: Modifies src/utils/change-utils.ts (createChange and related utilities), sharing the change-creation infrastructure that now includes metadata handling.
  • PR #415: Extends src/commands/artifact-workflow.ts and src/core/artifact-graph/instruction-loader.ts with schema wiring, modifying the same files to integrate schema selection into CLI and context-loading flows.

Poem

🐰 Schemas sprout in metadata now,
Each change remembers how,
With .openspec.yaml bright,
Schema choice, resolution's might! 🌱✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 69.23% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main feature: adding per-change schema metadata via a .openspec.yaml file, which aligns with the PR's primary objective of enabling automatic schema detection.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vibe-kanban-cloud
Copy link

Review Complete

Your review story is ready!

View Story

Comment !reviewfast on this PR to re-generate the story.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Fix all issues with AI Agents 🤖
In @test/utils/change-metadata.test.ts:
- Around line 88-99: The test currently asserts on the raw YAML string for
writeChangeMetadata which fails when the YAML lib emits unquoted dates; instead,
parse the file contents (e.g., using the project's YAML parser) and assert the
semantic value: read the file at metaPath, parse the YAML into an object, and
expect parsed.created to equal '2025-01-05' (and keep the schema check on
parsed.schema or parsed['schema'] rather than string contains). This replaces
string matching for created with a value equality assertion.
🧹 Nitpick comments (3)
src/core/artifact-graph/types.ts (1)

25-41: Consider using consistent error parameter naming.

The ChangeMetadataSchema uses message for error customization (lines 30, 36), while the existing schemas in this file use error (lines 5, 6, 8, 16, 18). For consistency and Zod 4 compatibility, consider using error throughout.

🔎 Proposed fix for consistency
 export const ChangeMetadataSchema = z.object({
   // Required: which workflow schema this change uses
-  schema: z.string().min(1, { message: 'schema is required' }),
+  schema: z.string().min(1, { error: 'schema is required' }),
 
   // Optional: creation timestamp (ISO date string)
   created: z
     .string()
     .regex(/^\d{4}-\d{2}-\d{2}$/, {
-      message: 'created must be YYYY-MM-DD format',
+      error: 'created must be YYYY-MM-DD format',
     })
     .optional(),
 });
test/utils/change-utils.test.ts (1)

141-147: Consider parsing YAML for consistency.

While this test currently passes, it uses the same brittle string matching approach as the failing test above. For consistency and robustness, parse the YAML to verify semantic values.

🔎 Suggested refactor for consistency
+import yaml from 'yaml';
+
 it('should create .openspec.yaml with custom schema', async () => {
   await createChange(testDir, 'add-auth', { schema: 'tdd' });
 
   const metaPath = path.join(testDir, 'openspec', 'changes', 'add-auth', '.openspec.yaml');
   const content = await fs.readFile(metaPath, 'utf-8');
-  expect(content).toContain('schema: tdd');
+  const parsed = yaml.parse(content);
+  expect(parsed.schema).toBe('tdd');
 });
src/utils/change-utils.ts (1)

5-5: Consider extracting DEFAULT_SCHEMA to a shared constant.

DEFAULT_SCHEMA = 'spec-driven' is duplicated here and in src/commands/artifact-workflow.ts (line 62). Extracting to a shared location would prevent drift.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cac5404 and d6514b4.

📒 Files selected for processing (10)
  • openspec/changes/add-per-change-schema-metadata/tasks.md
  • src/commands/artifact-workflow.ts
  • src/core/artifact-graph/instruction-loader.ts
  • src/core/artifact-graph/types.ts
  • src/utils/change-metadata.ts
  • src/utils/change-utils.ts
  • src/utils/index.ts
  • test/core/artifact-graph/instruction-loader.test.ts
  • test/utils/change-metadata.test.ts
  • test/utils/change-utils.test.ts
🧰 Additional context used
📓 Path-based instructions (2)
openspec/changes/**/*.md

📄 CodeRabbit inference engine (openspec/AGENTS.md)

Scaffold proposal using proposal.md, tasks.md, optional design.md, and delta specs under openspec/changes/<id>/

Files:

  • openspec/changes/add-per-change-schema-metadata/tasks.md
openspec/changes/*/tasks.md

📄 CodeRabbit inference engine (openspec/AGENTS.md)

Ensure tasks.md contains implementation checklist with numbered sections and checkbox items

Files:

  • openspec/changes/add-per-change-schema-metadata/tasks.md
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/**/*.md : Scaffold proposal using `proposal.md`, `tasks.md`, optional `design.md`, and delta specs under `openspec/changes/<id>/`
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Run `openspec validate [change-id] --strict` before requesting approval
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/**/specs/**/spec.md : Use `## ADDED|MODIFIED|REMOVED|RENAMED Requirements` headers in spec delta files
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/*/tasks.md : Ensure `tasks.md` contains implementation checklist with numbered sections and checkbox items

Applied to files:

  • openspec/changes/add-per-change-schema-metadata/tasks.md
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/**/*.md : Scaffold proposal using `proposal.md`, `tasks.md`, optional `design.md`, and delta specs under `openspec/changes/<id>/`

Applied to files:

  • openspec/changes/add-per-change-schema-metadata/tasks.md
  • src/utils/change-metadata.ts
  • test/core/artifact-graph/instruction-loader.test.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/*/proposal.md : Ensure `proposal.md` includes sections: Why (1-2 sentences), What Changes (bullet list with breaking change markers), and Impact (affected specs and code)

Applied to files:

  • openspec/changes/add-per-change-schema-metadata/tasks.md
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Run `openspec validate [change-id] --strict` before requesting approval

Applied to files:

  • src/commands/artifact-workflow.ts
🧬 Code graph analysis (6)
test/utils/change-utils.test.ts (1)
src/utils/change-utils.ts (1)
  • createChange (99-131)
src/core/artifact-graph/instruction-loader.ts (1)
src/utils/change-metadata.ts (1)
  • resolveSchemaForChange (150-171)
src/utils/change-metadata.ts (2)
src/utils/index.ts (5)
  • ChangeMetadataError (11-11)
  • validateSchemaName (10-10)
  • writeChangeMetadata (8-8)
  • readChangeMetadata (7-7)
  • resolveSchemaForChange (9-9)
src/core/artifact-graph/types.ts (2)
  • ChangeMetadata (41-41)
  • ChangeMetadataSchema (28-39)
test/core/artifact-graph/instruction-loader.test.ts (1)
src/core/artifact-graph/instruction-loader.ts (1)
  • loadChangeContext (156-177)
test/utils/change-metadata.test.ts (3)
src/core/artifact-graph/types.ts (1)
  • ChangeMetadataSchema (28-39)
src/utils/change-metadata.ts (5)
  • writeChangeMetadata (47-77)
  • readChangeMetadata (86-136)
  • ChangeMetadataError (12-21)
  • resolveSchemaForChange (150-171)
  • validateSchemaName (30-38)
src/utils/index.ts (5)
  • writeChangeMetadata (8-8)
  • readChangeMetadata (7-7)
  • ChangeMetadataError (11-11)
  • resolveSchemaForChange (9-9)
  • validateSchemaName (10-10)
src/commands/artifact-workflow.ts (2)
src/core/artifact-graph/instruction-loader.ts (1)
  • loadChangeContext (156-177)
src/utils/change-utils.ts (1)
  • createChange (99-131)
🪛 GitHub Actions: CI
test/utils/change-utils.test.ts

[error] 138-138: createChange test failed. Expected the metadata file to match /created: "\d{4}-\d{2}-\d{2}"/ but received an unquoted date value in the created field.

test/utils/change-metadata.test.ts

[error] 98-98: writeChangeMetadata test failed. Expected YAML to contain created: "YYYY-MM-DD" (date quoted as string) but got an unquoted date value.

🪛 GitHub Check: Test
test/utils/change-utils.test.ts

[failure] 138-138: test/utils/change-utils.test.ts > createChange > creates directory > should create .openspec.yaml metadata file with default schema
AssertionError: expected 'schema: spec-driven\ncreated: 2026-01…' to match /created: "\d{4}-\d{2}-\d{2}"/

  • Expected:
    /created: "\d{4}-\d{2}-\d{2}"/
  • Received:
    "schema: spec-driven
    created: 2026-01-06
    "

❯ test/utils/change-utils.test.ts:138:23

test/utils/change-metadata.test.ts

[failure] 98-98: test/utils/change-metadata.test.ts > writeChangeMetadata > should write valid YAML metadata file
AssertionError: expected 'schema: spec-driven\ncreated: 2025-01…' to contain 'created: "2025-01-05"'

  • Expected
  • Received
  • created: "2025-01-05"
  • schema: spec-driven
  • created: 2025-01-05

❯ test/utils/change-metadata.test.ts:98:21

🔇 Additional comments (19)
openspec/changes/add-per-change-schema-metadata/tasks.md (1)

1-29: LGTM! Tasks checklist follows guidelines.

The tasks.md file properly follows the coding guidelines with numbered sections and checkbox items. All tasks are marked complete, consistent with the PR objectives stating all 654 tests pass.

Based on coding guidelines requiring numbered sections and checkbox items in tasks.md files.

test/core/artifact-graph/instruction-loader.test.ts (1)

90-124: LGTM! Schema resolution tests correctly validate precedence logic.

The three new test cases properly exercise the schema resolution order (explicit > metadata > default):

  • Auto-detection from .openspec.yaml when no explicit schema provided
  • Explicit schema parameter overrides metadata file
  • Default spec-driven fallback when neither exists

The test implementation is thorough and correctly validates both the context's schemaName and the graph's name.

test/utils/change-utils.test.ts (1)

150-156: LGTM! Schema validation test correctly verifies error handling.

The test properly validates that an unknown schema name throws an error during change creation.

src/core/artifact-graph/instruction-loader.ts (2)

6-6: LGTM!

Import correctly added for the new schema resolution utility.


146-154: Well-documented schema resolution with clean delegation.

The updated JSDoc clearly explains the resolution order (explicit > metadata > default), and the implementation correctly delegates to resolveSchemaForChange. The optional schemaName parameter enables auto-detection while maintaining backward compatibility.

Also applies to: 156-177

src/utils/change-utils.ts (2)

3-13: LGTM!

Clean interface definition and imports. The CreateChangeOptions interface with optional schema maintains backward compatibility.


99-131: Solid implementation of schema-aware change creation.

The flow is well-structured:

  1. Validates name format first
  2. Validates schema existence before any filesystem operations
  3. Checks for existing directory to prevent overwrites
  4. Creates directory and writes metadata atomically

The date formatting using toISOString().split('T')[0] correctly produces YYYY-MM-DD matching the schema's regex.

src/utils/index.ts (1)

1-12: LGTM!

Clean barrel export file with proper separation of type and value exports. All new metadata utilities are correctly exposed in the public API.

src/commands/artifact-workflow.ts (5)

191-197: LGTM!

Good pattern: validates schema existence only when explicitly provided, allowing loadChangeContext to handle auto-detection otherwise.


260-283: LGTM!

Instructions command follows the same validation pattern, and correctly uses context.schemaName (the resolved schema) in error messages.


433-439: LGTM!

Apply instructions command correctly delegates schema resolution to loadChangeContext via generateApplyInstructions, maintaining consistent behavior.

Also applies to: 519-525


656-697: LGTM!

The new change command properly validates schema before creation and provides clear success messaging that includes the schema used.


792-792: LGTM!

CLI help text clearly communicates that --schema is an override and that auto-detection from .openspec.yaml is the default behavior.

Also applies to: 809-809, 849-849

src/utils/change-metadata.ts (6)

1-7: LGTM!

Clean imports and well-named constant for the metadata filename.


9-21: LGTM!

Good custom error class that includes the metadata file path for debugging context. The optional cause property enables error chaining.


23-38: LGTM!

Clean validation function with descriptive error message listing available schemas.


40-77: LGTM!

Solid implementation with layered validation:

  1. Schema existence check via validateSchemaName
  2. Structure validation via Zod schema
  3. I/O error handling with proper error wrapping

This ensures both valid schema reference and valid YAML structure before writing.


79-136: LGTM!

Comprehensive read function with proper error handling:

  • Returns null for missing files (expected case for legacy changes)
  • Throws ChangeMetadataError for corrupted/invalid files
  • Validates both YAML structure and schema existence

The post-Zod schema existence check (lines 127-133) is important since ChangeMetadataSchema only validates the string format, not that the schema actually exists.


138-171: LGTM!

Resolution logic correctly implements the documented priority:

  1. Explicit override wins
  2. Metadata file schema if present
  3. Default fallback

The silent catch block (line 165) is intentional—if metadata is corrupted or has an invalid schema, falling back to default is reasonable for this resolution function.

Comment on lines 88 to 99
it('should write valid YAML metadata file', async () => {
writeChangeMetadata(changeDir, {
schema: 'spec-driven',
created: '2025-01-05',
});

const metaPath = path.join(changeDir, '.openspec.yaml');
const content = await fs.readFile(metaPath, 'utf-8');

expect(content).toContain('schema: spec-driven');
expect(content).toContain('created: "2025-01-05"');
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix test to handle unquoted YAML date values.

The test expects the created field to be quoted (created: "2025-01-05"), but the YAML library outputs unquoted dates (created: 2025-01-05), which is valid YAML for strings. This causes the pipeline failure.

Instead of checking the raw YAML string format, parse the YAML and verify the semantic value.

🔎 Proposed fix using YAML parsing
+import yaml from 'yaml';
+
 it('should write valid YAML metadata file', async () => {
   writeChangeMetadata(changeDir, {
     schema: 'spec-driven',
     created: '2025-01-05',
   });
 
   const metaPath = path.join(changeDir, '.openspec.yaml');
   const content = await fs.readFile(metaPath, 'utf-8');
+  const parsed = yaml.parse(content);
 
-  expect(content).toContain('schema: spec-driven');
-  expect(content).toContain('created: "2025-01-05"');
+  expect(parsed.schema).toBe('spec-driven');
+  expect(parsed.created).toBe('2025-01-05');
 });

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 GitHub Actions: CI

[error] 98-98: writeChangeMetadata test failed. Expected YAML to contain created: "YYYY-MM-DD" (date quoted as string) but got an unquoted date value.

🪛 GitHub Check: Test

[failure] 98-98: test/utils/change-metadata.test.ts > writeChangeMetadata > should write valid YAML metadata file
AssertionError: expected 'schema: spec-driven\ncreated: 2025-01…' to contain 'created: "2025-01-05"'

  • Expected
  • Received
  • created: "2025-01-05"
  • schema: spec-driven
  • created: 2025-01-05

❯ test/utils/change-metadata.test.ts:98:21

🤖 Prompt for AI Agents
In @test/utils/change-metadata.test.ts around lines 88-99, The test currently
asserts on the raw YAML string for writeChangeMetadata which fails when the YAML
lib emits unquoted dates; instead, parse the file contents (e.g., using the
project's YAML parser) and assert the semantic value: read the file at metaPath,
parse the YAML into an object, and expect parsed.created to equal '2025-01-05'
(and keep the schema check on parsed.schema or parsed['schema'] rather than
string contains). This replaces string matching for created with a value
equality assertion.

This feature enables workflow schema auto-detection for changes:

- Add ChangeMetadataSchema Zod schema to types.ts
- Create change-metadata.ts with writeChangeMetadata(), readChangeMetadata()
- Update createChange() to accept optional schema param and write metadata
- Modify loadChangeContext() to auto-detect schema from .openspec.yaml
- Add --schema option to openspec new change command
- Update status/instructions commands to auto-detect schema from metadata

Schema resolution order:
1. Explicit --schema flag (if provided)
2. Schema from .openspec.yaml in change directory
3. Default 'spec-driven'
@TabishB TabishB force-pushed the TabishB/west-monroe branch from d6514b4 to afce92e Compare January 6, 2026 01:10
@TabishB TabishB merged commit 1786684 into main Jan 6, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants