更新openspec
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 4m48s

This commit is contained in:
2026-01-27 10:03:49 +08:00
parent 477a9fc98d
commit 5a179ba16b
27 changed files with 2537 additions and 710 deletions

View File

@@ -1,6 +1,12 @@
---
name: openspec-new-change
description: Start a new OpenSpec change using the experimental artifact workflow. Use when the user wants to create a new feature, fix, or modification with a structured step-by-step approach.
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.0.1"
---
Start a new change using the experimental artifact-driven approach.
@@ -18,21 +24,21 @@ Start a new change using the experimental artifact-driven approach.
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
2. **Select a workflow schema**
2. **Determine the workflow schema**
Run `openspec schemas --json` to get available schemas with descriptions.
Use the default schema (omit `--schema`) unless the user explicitly requests a different workflow.
Use the **AskUserQuestion tool** to let the user choose a workflow:
- Present each schema with its description
- Mark `spec-driven` as "(default)" if it's available
- Example options: "spec-driven - proposal → specs → design → tasks (default)", "tdd - tests → implementation → docs"
**Use a different schema only if the user mentions:**
- A specific schema name → use `--schema <name>`
- "show workflows" or "what workflows" → run `openspec schemas --json` and let them choose
If user doesn't have a preference, default to `spec-driven`.
**Otherwise**: Omit `--schema` to use the default.
3. **Create the change directory**
```bash
openspec new change "<name>" --schema "<selected-schema>"
openspec new change "<name>"
```
Add `--schema <name>` only if the user requested a specific workflow.
This creates a scaffolded change at `openspec/changes/<name>/` with the selected schema.
4. **Show the artifact status**
@@ -42,7 +48,7 @@ Start a new change using the experimental artifact-driven approach.
This shows which artifacts need to be created and which are ready (dependencies satisfied).
5. **Get instructions for the first artifact**
The first artifact depends on the schema (e.g., `proposal` for spec-driven, `spec` for tdd).
The first artifact depends on the schema (e.g., `proposal` for spec-driven).
Check the status output to find the first artifact with status "ready".
```bash
openspec instructions <first-artifact-id> --change "<name>"
@@ -55,7 +61,7 @@ Start a new change using the experimental artifact-driven approach.
After completing the steps, summarize:
- Change name and location
- Selected schema/workflow and its artifact sequence
- Schema/workflow being used and its artifact sequence
- Current status (0/N artifacts complete)
- The template for the first artifact
- Prompt: "Ready to create the first artifact? Just describe what this change is about and I'll draft it, or ask me to continue."
@@ -65,4 +71,4 @@ After completing the steps, summarize:
- Do NOT advance beyond showing the first artifact template
- If the name is invalid (not kebab-case), ask for a valid name
- If a change with that name already exists, suggest continuing that change instead
- Always pass --schema to preserve the user's workflow choice
- Pass --schema if using a non-default workflow