Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"files": [
"dist",
"bin",
"schemas",
"scripts/postinstall.js",
"!dist/**/*.test.js",
"!dist/**/__tests__",
Expand Down
28 changes: 28 additions & 0 deletions schemas/spec-driven/schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: spec-driven
version: 1
description: Default OpenSpec workflow - proposal → specs → design → tasks
artifacts:
- id: proposal
generates: proposal.md
description: Initial proposal document outlining the change
template: proposal.md
requires: []
- id: specs
generates: "specs/*.md"
description: Detailed specifications for the change
template: spec.md
requires:
- proposal
- id: design
generates: design.md
description: Technical design document with implementation details
template: design.md
requires:
- proposal
- id: tasks
generates: tasks.md
description: Implementation tasks derived from specs and design
template: tasks.md
requires:
- specs
- design
19 changes: 19 additions & 0 deletions schemas/spec-driven/templates/design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Context

<!-- Background and current state -->

## Goals / Non-Goals

**Goals:**
<!-- What this design aims to achieve -->

**Non-Goals:**
<!-- What is explicitly out of scope -->

## Decisions

<!-- Key design decisions and rationale -->

## Risks / Trade-offs

<!-- Known risks and trade-offs -->
11 changes: 11 additions & 0 deletions schemas/spec-driven/templates/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Why

<!-- Explain the motivation for this change -->

## What Changes

<!-- Describe what will change -->

## Impact

<!-- List affected areas -->
8 changes: 8 additions & 0 deletions schemas/spec-driven/templates/spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## ADDED Requirements

### Requirement: <!-- requirement name -->
<!-- requirement text -->

#### Scenario: <!-- scenario name -->
- **WHEN** <!-- condition -->
- **THEN** <!-- expected outcome -->
9 changes: 9 additions & 0 deletions schemas/spec-driven/templates/tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## 1. <!-- Task Group Name -->

- [ ] 1.1 <!-- Task description -->
- [ ] 1.2 <!-- Task description -->

## 2. <!-- Task Group Name -->

- [ ] 2.1 <!-- Task description -->
- [ ] 2.2 <!-- Task description -->
27 changes: 27 additions & 0 deletions schemas/tdd/schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: tdd
version: 1
description: Test-driven development workflow - tests → implementation → docs
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 | 🟡 Minor

Description doesn't mention the initial spec step.

The description says "tests → implementation → docs" but the workflow actually starts with spec before tests. Consider updating for accuracy:

-description: Test-driven development workflow - tests → implementation → docs
+description: Test-driven development workflow - spec → tests → implementation → docs
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
description: Test-driven development workflow - tests → implementation → docs
description: Test-driven development workflow - spec → tests → implementation → docs
🤖 Prompt for AI Agents
In schemas/tdd/schema.yaml around line 3, the description omits the initial
"spec" step and currently reads "tests → implementation → docs"; update the
description to include the initial spec step (e.g., "spec → tests →
implementation → docs" or equivalent) so the workflow order accurately reflects
spec before tests.

artifacts:
- id: spec
generates: spec.md
description: Feature specification defining requirements
template: spec.md
requires: []
- id: tests
generates: "tests/*.test.ts"
description: Test files written before implementation
template: test.md
requires:
- spec
- id: implementation
generates: "src/*.ts"
description: Implementation code to pass the tests
template: implementation.md
requires:
- tests
- id: docs
generates: "docs/*.md"
description: Documentation for the implemented feature
template: docs.md
requires:
- implementation
15 changes: 15 additions & 0 deletions schemas/tdd/templates/docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Overview

<!-- Feature overview -->

## Getting Started

<!-- Quick start guide -->

## Examples

<!-- Code examples -->

## Reference

<!-- API reference or additional details -->
11 changes: 11 additions & 0 deletions schemas/tdd/templates/implementation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Implementation Notes

<!-- Technical implementation details -->

## API

<!-- Public API documentation -->

## Usage

<!-- Usage examples -->
11 changes: 11 additions & 0 deletions schemas/tdd/templates/spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Feature: <!-- feature name -->

<!-- Feature description -->

## Requirements

<!-- List of requirements -->

## Acceptance Criteria

<!-- List of acceptance criteria -->
11 changes: 11 additions & 0 deletions schemas/tdd/templates/test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Test Plan

<!-- Describe the testing strategy -->

## Test Cases

### <!-- Test case name -->

- **Given:** <!-- preconditions -->
- **When:** <!-- action -->
- **Then:** <!-- expected result -->
84 changes: 0 additions & 84 deletions src/core/artifact-graph/builtin-schemas.ts

This file was deleted.

12 changes: 8 additions & 4 deletions src/core/artifact-graph/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ export { ArtifactGraph } from './graph.js';
export { detectCompleted } from './state.js';

// Schema resolution
export { resolveSchema, listSchemas } from './resolver.js';

// Built-in schemas
export { BUILTIN_SCHEMAS, SPEC_DRIVEN_SCHEMA, TDD_SCHEMA } from './builtin-schemas.js';
export {
resolveSchema,
listSchemas,
getSchemaDir,
getPackageSchemasDir,
getUserSchemasDir,
SchemaLoadError,
} from './resolver.js';
Loading
Loading