Merge remote-tracking branch 'origin/ci/dependabot-openspec-autofix' into ci/dependabot-openspec-autofix
This commit is contained in:
commit
52aada6242
8 changed files with 92 additions and 64 deletions
|
|
@ -1,16 +1,19 @@
|
||||||
---
|
---
|
||||||
name: openspec-apply-change
|
name: openspec-apply-change
|
||||||
description: Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
|
description: Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
|
||||||
|
allowed-tools: Bash(openspec:*)
|
||||||
license: MIT
|
license: MIT
|
||||||
compatibility: Requires openspec CLI.
|
compatibility: Requires openspec CLI.
|
||||||
metadata:
|
metadata:
|
||||||
author: openspec
|
author: openspec
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
generatedBy: "1.2.0"
|
generatedBy: "1.6.0"
|
||||||
---
|
---
|
||||||
|
|
||||||
Implement tasks from an OpenSpec change.
|
Implement tasks from an OpenSpec change.
|
||||||
|
|
||||||
|
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
||||||
|
|
||||||
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
||||||
|
|
||||||
**Steps**
|
**Steps**
|
||||||
|
|
@ -30,6 +33,7 @@ Implement tasks from an OpenSpec change.
|
||||||
```
|
```
|
||||||
Parse the JSON to understand:
|
Parse the JSON to understand:
|
||||||
- `schemaName`: The workflow being used (e.g., "spec-driven")
|
- `schemaName`: The workflow being used (e.g., "spec-driven")
|
||||||
|
- `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit constraints
|
||||||
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
|
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
|
||||||
|
|
||||||
3. **Get apply instructions**
|
3. **Get apply instructions**
|
||||||
|
|
@ -39,7 +43,7 @@ Implement tasks from an OpenSpec change.
|
||||||
```
|
```
|
||||||
|
|
||||||
This returns:
|
This returns:
|
||||||
- Context file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
|
- `contextFiles`: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
|
||||||
- Progress (total, complete, remaining)
|
- Progress (total, complete, remaining)
|
||||||
- Task list with status
|
- Task list with status
|
||||||
- Dynamic instruction based on current state
|
- Dynamic instruction based on current state
|
||||||
|
|
@ -51,7 +55,7 @@ Implement tasks from an OpenSpec change.
|
||||||
|
|
||||||
4. **Read context files**
|
4. **Read context files**
|
||||||
|
|
||||||
Read the files listed in `contextFiles` from the apply instructions output.
|
Read every file path listed under `contextFiles` from the apply instructions output.
|
||||||
The files depend on the schema being used:
|
The files depend on the schema being used:
|
||||||
- **spec-driven**: proposal, specs, design, tasks
|
- **spec-driven**: proposal, specs, design, tasks
|
||||||
- Other schemas: follow the contextFiles from CLI output
|
- Other schemas: follow the contextFiles from CLI output
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,19 @@
|
||||||
---
|
---
|
||||||
name: openspec-archive-change
|
name: openspec-archive-change
|
||||||
description: Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
|
description: Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
|
||||||
|
allowed-tools: Bash(openspec:*)
|
||||||
license: MIT
|
license: MIT
|
||||||
compatibility: Requires openspec CLI.
|
compatibility: Requires openspec CLI.
|
||||||
metadata:
|
metadata:
|
||||||
author: openspec
|
author: openspec
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
generatedBy: "1.2.0"
|
generatedBy: "1.6.0"
|
||||||
---
|
---
|
||||||
|
|
||||||
Archive a completed change in the experimental workflow.
|
Archive a completed change in the experimental workflow.
|
||||||
|
|
||||||
|
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
||||||
|
|
||||||
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
||||||
|
|
||||||
**Steps**
|
**Steps**
|
||||||
|
|
@ -30,6 +33,7 @@ Archive a completed change in the experimental workflow.
|
||||||
|
|
||||||
Parse the JSON to understand:
|
Parse the JSON to understand:
|
||||||
- `schemaName`: The workflow being used
|
- `schemaName`: The workflow being used
|
||||||
|
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context
|
||||||
- `artifacts`: List of artifacts with their status (`done` or other)
|
- `artifacts`: List of artifacts with their status (`done` or other)
|
||||||
|
|
||||||
**If any artifacts are not `done`:**
|
**If any artifacts are not `done`:**
|
||||||
|
|
@ -52,7 +56,7 @@ Archive a completed change in the experimental workflow.
|
||||||
|
|
||||||
4. **Assess delta spec sync state**
|
4. **Assess delta spec sync state**
|
||||||
|
|
||||||
Check for delta specs at `openspec/changes/<name>/specs/`. If none exist, proceed without sync prompt.
|
Use `artifactPaths.specs.existingOutputPaths` from status JSON to check for delta specs. If none exist, proceed without sync prompt.
|
||||||
|
|
||||||
**If delta specs exist:**
|
**If delta specs exist:**
|
||||||
- Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
|
- Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
|
||||||
|
|
@ -67,19 +71,19 @@ Archive a completed change in the experimental workflow.
|
||||||
|
|
||||||
5. **Perform the archive**
|
5. **Perform the archive**
|
||||||
|
|
||||||
Create the archive directory if it doesn't exist:
|
Create an `archive` directory under `planningHome.changesDir` if it doesn't exist:
|
||||||
```bash
|
```bash
|
||||||
mkdir -p openspec/changes/archive
|
mkdir -p "<planningHome.changesDir>/archive"
|
||||||
```
|
```
|
||||||
|
|
||||||
Generate target name using current date: `YYYY-MM-DD-<change-name>`
|
Generate target name using current date: `YYYY-MM-DD-<change-name>`
|
||||||
|
|
||||||
**Check if target already exists:**
|
**Check if target already exists:**
|
||||||
- If yes: Fail with error, suggest renaming existing archive or using different date
|
- If yes: Fail with error, suggest renaming existing archive or using different date
|
||||||
- If no: Move the change directory to archive
|
- If no: Move `changeRoot` to the archive directory
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
|
mv "<changeRoot>" "<planningHome.changesDir>/archive/YYYY-MM-DD-<name>"
|
||||||
```
|
```
|
||||||
|
|
||||||
6. **Display summary**
|
6. **Display summary**
|
||||||
|
|
@ -98,7 +102,7 @@ Archive a completed change in the experimental workflow.
|
||||||
|
|
||||||
**Change:** <change-name>
|
**Change:** <change-name>
|
||||||
**Schema:** <schema-name>
|
**Schema:** <schema-name>
|
||||||
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
|
**Archived to:** the archive path derived from `planningHome.changesDir`/YYYY-MM-DD-<name>/
|
||||||
**Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
|
**Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
|
||||||
|
|
||||||
All artifacts complete. All tasks complete.
|
All artifacts complete. All tasks complete.
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
---
|
---
|
||||||
name: openspec-explore
|
name: openspec-explore
|
||||||
description: Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
|
description: Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
|
||||||
|
allowed-tools: Bash(openspec:*)
|
||||||
license: MIT
|
license: MIT
|
||||||
compatibility: Requires openspec CLI.
|
compatibility: Requires openspec CLI.
|
||||||
metadata:
|
metadata:
|
||||||
author: openspec
|
author: openspec
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
generatedBy: "1.2.0"
|
generatedBy: "1.6.0"
|
||||||
---
|
---
|
||||||
|
|
||||||
Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
|
Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
|
||||||
|
|
@ -15,6 +16,8 @@ Enter explore mode. Think deeply. Visualize freely. Follow the conversation wher
|
||||||
|
|
||||||
**This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
|
**This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
|
||||||
|
|
||||||
|
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## The Stance
|
## The Stance
|
||||||
|
|
@ -56,10 +59,10 @@ Depending on what the user brings, you might:
|
||||||
│ Use ASCII diagrams liberally │
|
│ Use ASCII diagrams liberally │
|
||||||
├─────────────────────────────────────────┤
|
├─────────────────────────────────────────┤
|
||||||
│ │
|
│ │
|
||||||
│ ┌────────┐ ┌────────┐ │
|
│ ┌────────┐ ┌────────┐ │
|
||||||
│ │ State │────────▶│ State │ │
|
│ │ State │────────▶│ State │ │
|
||||||
│ │ A │ │ B │ │
|
│ │ A │ │ B │ │
|
||||||
│ └────────┘ └────────┘ │
|
│ └────────┘ └────────┘ │
|
||||||
│ │
|
│ │
|
||||||
│ System diagrams, state machines, │
|
│ System diagrams, state machines, │
|
||||||
│ data flows, architecture sketches, │
|
│ data flows, architecture sketches, │
|
||||||
|
|
@ -102,11 +105,10 @@ Think freely. When insights crystallize, you might offer:
|
||||||
|
|
||||||
If the user mentions a change or you detect one is relevant:
|
If the user mentions a change or you detect one is relevant:
|
||||||
|
|
||||||
1. **Read existing artifacts for context**
|
1. **Resolve and read existing artifacts for context**
|
||||||
- `openspec/changes/<name>/proposal.md`
|
- Run `openspec status --change "<name>" --json`.
|
||||||
- `openspec/changes/<name>/design.md`
|
- Use `changeRoot`, `artifactPaths`, and `actionContext` from the status JSON.
|
||||||
- `openspec/changes/<name>/tasks.md`
|
- Read existing files from `artifactPaths.<artifact>.existingOutputPaths`.
|
||||||
- etc.
|
|
||||||
|
|
||||||
2. **Reference them naturally in conversation**
|
2. **Reference them naturally in conversation**
|
||||||
- "Your design mentions using Redis, but we just realized SQLite fits better..."
|
- "Your design mentions using Redis, but we just realized SQLite fits better..."
|
||||||
|
|
@ -114,14 +116,14 @@ If the user mentions a change or you detect one is relevant:
|
||||||
|
|
||||||
3. **Offer to capture when decisions are made**
|
3. **Offer to capture when decisions are made**
|
||||||
|
|
||||||
| Insight Type | Where to Capture |
|
| Insight Type | Where to Capture |
|
||||||
|--------------|------------------|
|
|----------------------------|--------------------------------|
|
||||||
| New requirement discovered | `specs/<capability>/spec.md` |
|
| New requirement discovered | `specs/<capability>/spec.md` |
|
||||||
| Requirement changed | `specs/<capability>/spec.md` |
|
| Requirement changed | `specs/<capability>/spec.md` |
|
||||||
| Design decision made | `design.md` |
|
| Design decision made | `design.md` |
|
||||||
| Scope changed | `proposal.md` |
|
| Scope changed | `proposal.md` |
|
||||||
| New work identified | `tasks.md` |
|
| New work identified | `tasks.md` |
|
||||||
| Assumption invalidated | Relevant artifact |
|
| Assumption invalidated | Relevant artifact |
|
||||||
|
|
||||||
Example offers:
|
Example offers:
|
||||||
- "That's a design decision. Capture it in design.md?"
|
- "That's a design decision. Capture it in design.md?"
|
||||||
|
|
@ -227,7 +229,7 @@ User: A CLI tool that tracks local dev environments
|
||||||
You: That changes everything.
|
You: That changes everything.
|
||||||
|
|
||||||
┌─────────────────────────────────────────────────┐
|
┌─────────────────────────────────────────────────┐
|
||||||
│ CLI TOOL DATA STORAGE │
|
│ CLI TOOL DATA STORAGE │
|
||||||
└─────────────────────────────────────────────────┘
|
└─────────────────────────────────────────────────┘
|
||||||
|
|
||||||
Key constraints:
|
Key constraints:
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
---
|
---
|
||||||
name: openspec-propose
|
name: openspec-propose
|
||||||
description: Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
|
description: Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
|
||||||
|
allowed-tools: Bash(openspec:*)
|
||||||
license: MIT
|
license: MIT
|
||||||
compatibility: Requires openspec CLI.
|
compatibility: Requires openspec CLI.
|
||||||
metadata:
|
metadata:
|
||||||
author: openspec
|
author: openspec
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
generatedBy: "1.2.0"
|
generatedBy: "1.6.0"
|
||||||
---
|
---
|
||||||
|
|
||||||
Propose a new change - create the change and generate all artifacts in one step.
|
Propose a new change - create the change and generate all artifacts in one step.
|
||||||
|
|
@ -20,6 +21,8 @@ When ready to implement, run /opsx:apply
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
||||||
|
|
||||||
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
|
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
|
||||||
|
|
||||||
**Steps**
|
**Steps**
|
||||||
|
|
@ -37,7 +40,7 @@ When ready to implement, run /opsx:apply
|
||||||
```bash
|
```bash
|
||||||
openspec new change "<name>"
|
openspec new change "<name>"
|
||||||
```
|
```
|
||||||
This creates a scaffolded change at `openspec/changes/<name>/` with `.openspec.yaml`.
|
This creates a scaffolded change in the planning home resolved by the CLI with `.openspec.yaml`.
|
||||||
|
|
||||||
3. **Get the artifact build order**
|
3. **Get the artifact build order**
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -46,6 +49,7 @@ When ready to implement, run /opsx:apply
|
||||||
Parse the JSON to get:
|
Parse the JSON to get:
|
||||||
- `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
|
- `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
|
||||||
- `artifacts`: list of all artifacts with their status and dependencies
|
- `artifacts`: list of all artifacts with their status and dependencies
|
||||||
|
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context. Use these instead of assuming repo-local paths.
|
||||||
|
|
||||||
4. **Create artifacts in sequence until apply-ready**
|
4. **Create artifacts in sequence until apply-ready**
|
||||||
|
|
||||||
|
|
@ -63,10 +67,10 @@ When ready to implement, run /opsx:apply
|
||||||
- `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
|
- `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
|
||||||
- `template`: The structure to use for your output file
|
- `template`: The structure to use for your output file
|
||||||
- `instruction`: Schema-specific guidance for this artifact type
|
- `instruction`: Schema-specific guidance for this artifact type
|
||||||
- `outputPath`: Where to write the artifact
|
- `resolvedOutputPath`: Resolved path or pattern to write the artifact
|
||||||
- `dependencies`: Completed artifacts to read for context
|
- `dependencies`: Completed artifacts to read for context
|
||||||
- Read any completed dependency files for context
|
- Read any completed dependency files for context
|
||||||
- Create the artifact file using `template` as the structure
|
- Create the artifact file using `template` as the structure and write it to `resolvedOutputPath`
|
||||||
- Apply `context` and `rules` as constraints - but do NOT copy them into the file
|
- Apply `context` and `rules` as constraints - but do NOT copy them into the file
|
||||||
- Show brief progress: "Created <artifact-id>"
|
- Show brief progress: "Created <artifact-id>"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,15 @@
|
||||||
---
|
---
|
||||||
name: "OPSX: Apply"
|
name: "OPSX: Apply"
|
||||||
description: Implement tasks from an OpenSpec change (Experimental)
|
description: Implement tasks from an OpenSpec change (Experimental)
|
||||||
|
allowed-tools: Bash(openspec:*)
|
||||||
category: Workflow
|
category: Workflow
|
||||||
tags: [workflow, artifacts, experimental]
|
tags: [workflow, artifacts, experimental]
|
||||||
---
|
---
|
||||||
|
|
||||||
Implement tasks from an OpenSpec change.
|
Implement tasks from an OpenSpec change.
|
||||||
|
|
||||||
|
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
||||||
|
|
||||||
**Input**: Optionally specify a change name (e.g., `/opsx:apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
**Input**: Optionally specify a change name (e.g., `/opsx:apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
||||||
|
|
||||||
**Steps**
|
**Steps**
|
||||||
|
|
@ -26,6 +29,7 @@ Implement tasks from an OpenSpec change.
|
||||||
```
|
```
|
||||||
Parse the JSON to understand:
|
Parse the JSON to understand:
|
||||||
- `schemaName`: The workflow being used (e.g., "spec-driven")
|
- `schemaName`: The workflow being used (e.g., "spec-driven")
|
||||||
|
- `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit constraints
|
||||||
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
|
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
|
||||||
|
|
||||||
3. **Get apply instructions**
|
3. **Get apply instructions**
|
||||||
|
|
@ -35,7 +39,7 @@ Implement tasks from an OpenSpec change.
|
||||||
```
|
```
|
||||||
|
|
||||||
This returns:
|
This returns:
|
||||||
- Context file paths (varies by schema)
|
- `contextFiles`: artifact ID -> array of concrete file paths (varies by schema)
|
||||||
- Progress (total, complete, remaining)
|
- Progress (total, complete, remaining)
|
||||||
- Task list with status
|
- Task list with status
|
||||||
- Dynamic instruction based on current state
|
- Dynamic instruction based on current state
|
||||||
|
|
@ -47,7 +51,7 @@ Implement tasks from an OpenSpec change.
|
||||||
|
|
||||||
4. **Read context files**
|
4. **Read context files**
|
||||||
|
|
||||||
Read the files listed in `contextFiles` from the apply instructions output.
|
Read every file path listed under `contextFiles` from the apply instructions output.
|
||||||
The files depend on the schema being used:
|
The files depend on the schema being used:
|
||||||
- **spec-driven**: proposal, specs, design, tasks
|
- **spec-driven**: proposal, specs, design, tasks
|
||||||
- Other schemas: follow the contextFiles from CLI output
|
- Other schemas: follow the contextFiles from CLI output
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,15 @@
|
||||||
---
|
---
|
||||||
name: "OPSX: Archive"
|
name: "OPSX: Archive"
|
||||||
description: Archive a completed change in the experimental workflow
|
description: Archive a completed change in the experimental workflow
|
||||||
|
allowed-tools: Bash(openspec:*)
|
||||||
category: Workflow
|
category: Workflow
|
||||||
tags: [workflow, archive, experimental]
|
tags: [workflow, archive, experimental]
|
||||||
---
|
---
|
||||||
|
|
||||||
Archive a completed change in the experimental workflow.
|
Archive a completed change in the experimental workflow.
|
||||||
|
|
||||||
|
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
||||||
|
|
||||||
**Input**: Optionally specify a change name after `/opsx:archive` (e.g., `/opsx:archive add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
**Input**: Optionally specify a change name after `/opsx:archive` (e.g., `/opsx:archive add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
||||||
|
|
||||||
**Steps**
|
**Steps**
|
||||||
|
|
@ -26,6 +29,7 @@ Archive a completed change in the experimental workflow.
|
||||||
|
|
||||||
Parse the JSON to understand:
|
Parse the JSON to understand:
|
||||||
- `schemaName`: The workflow being used
|
- `schemaName`: The workflow being used
|
||||||
|
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context
|
||||||
- `artifacts`: List of artifacts with their status (`done` or other)
|
- `artifacts`: List of artifacts with their status (`done` or other)
|
||||||
|
|
||||||
**If any artifacts are not `done`:**
|
**If any artifacts are not `done`:**
|
||||||
|
|
@ -48,7 +52,7 @@ Archive a completed change in the experimental workflow.
|
||||||
|
|
||||||
4. **Assess delta spec sync state**
|
4. **Assess delta spec sync state**
|
||||||
|
|
||||||
Check for delta specs at `openspec/changes/<name>/specs/`. If none exist, proceed without sync prompt.
|
Use `artifactPaths.specs.existingOutputPaths` from status JSON to check for delta specs. If none exist, proceed without sync prompt.
|
||||||
|
|
||||||
**If delta specs exist:**
|
**If delta specs exist:**
|
||||||
- Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
|
- Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
|
||||||
|
|
@ -63,19 +67,19 @@ Archive a completed change in the experimental workflow.
|
||||||
|
|
||||||
5. **Perform the archive**
|
5. **Perform the archive**
|
||||||
|
|
||||||
Create the archive directory if it doesn't exist:
|
Create an `archive` directory under `planningHome.changesDir` if it doesn't exist:
|
||||||
```bash
|
```bash
|
||||||
mkdir -p openspec/changes/archive
|
mkdir -p "<planningHome.changesDir>/archive"
|
||||||
```
|
```
|
||||||
|
|
||||||
Generate target name using current date: `YYYY-MM-DD-<change-name>`
|
Generate target name using current date: `YYYY-MM-DD-<change-name>`
|
||||||
|
|
||||||
**Check if target already exists:**
|
**Check if target already exists:**
|
||||||
- If yes: Fail with error, suggest renaming existing archive or using different date
|
- If yes: Fail with error, suggest renaming existing archive or using different date
|
||||||
- If no: Move the change directory to archive
|
- If no: Move `changeRoot` to the archive directory
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
|
mv "<changeRoot>" "<planningHome.changesDir>/archive/YYYY-MM-DD-<name>"
|
||||||
```
|
```
|
||||||
|
|
||||||
6. **Display summary**
|
6. **Display summary**
|
||||||
|
|
@ -94,7 +98,7 @@ Archive a completed change in the experimental workflow.
|
||||||
|
|
||||||
**Change:** <change-name>
|
**Change:** <change-name>
|
||||||
**Schema:** <schema-name>
|
**Schema:** <schema-name>
|
||||||
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
|
**Archived to:** the archive path derived from `planningHome.changesDir`/YYYY-MM-DD-<name>/
|
||||||
**Specs:** ✓ Synced to main specs
|
**Specs:** ✓ Synced to main specs
|
||||||
|
|
||||||
All artifacts complete. All tasks complete.
|
All artifacts complete. All tasks complete.
|
||||||
|
|
@ -107,7 +111,7 @@ All artifacts complete. All tasks complete.
|
||||||
|
|
||||||
**Change:** <change-name>
|
**Change:** <change-name>
|
||||||
**Schema:** <schema-name>
|
**Schema:** <schema-name>
|
||||||
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
|
**Archived to:** the archive path derived from `planningHome.changesDir`/YYYY-MM-DD-<name>/
|
||||||
**Specs:** No delta specs
|
**Specs:** No delta specs
|
||||||
|
|
||||||
All artifacts complete. All tasks complete.
|
All artifacts complete. All tasks complete.
|
||||||
|
|
@ -120,7 +124,7 @@ All artifacts complete. All tasks complete.
|
||||||
|
|
||||||
**Change:** <change-name>
|
**Change:** <change-name>
|
||||||
**Schema:** <schema-name>
|
**Schema:** <schema-name>
|
||||||
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
|
**Archived to:** the archive path derived from `planningHome.changesDir`/YYYY-MM-DD-<name>/
|
||||||
**Specs:** Sync skipped (user chose to skip)
|
**Specs:** Sync skipped (user chose to skip)
|
||||||
|
|
||||||
**Warnings:**
|
**Warnings:**
|
||||||
|
|
@ -137,7 +141,7 @@ Review the archive if this was not intentional.
|
||||||
## Archive Failed
|
## Archive Failed
|
||||||
|
|
||||||
**Change:** <change-name>
|
**Change:** <change-name>
|
||||||
**Target:** openspec/changes/archive/YYYY-MM-DD-<name>/
|
**Target:** the archive path derived from `planningHome.changesDir`/YYYY-MM-DD-<name>/
|
||||||
|
|
||||||
Target archive directory already exists.
|
Target archive directory already exists.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
name: "OPSX: Explore"
|
name: "OPSX: Explore"
|
||||||
description: "Enter explore mode - think through ideas, investigate problems, clarify requirements"
|
description: "Enter explore mode - think through ideas, investigate problems, clarify requirements"
|
||||||
|
allowed-tools: Bash(openspec:*)
|
||||||
category: Workflow
|
category: Workflow
|
||||||
tags: [workflow, explore, experimental, thinking]
|
tags: [workflow, explore, experimental, thinking]
|
||||||
---
|
---
|
||||||
|
|
@ -11,6 +12,8 @@ Enter explore mode. Think deeply. Visualize freely. Follow the conversation wher
|
||||||
|
|
||||||
**This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
|
**This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
|
||||||
|
|
||||||
|
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
||||||
|
|
||||||
**Input**: The argument after `/opsx:explore` is whatever the user wants to think about. Could be:
|
**Input**: The argument after `/opsx:explore` is whatever the user wants to think about. Could be:
|
||||||
- A vague idea: "real-time collaboration"
|
- A vague idea: "real-time collaboration"
|
||||||
- A specific problem: "the auth system is getting unwieldy"
|
- A specific problem: "the auth system is getting unwieldy"
|
||||||
|
|
@ -59,10 +62,10 @@ Depending on what the user brings, you might:
|
||||||
│ Use ASCII diagrams liberally │
|
│ Use ASCII diagrams liberally │
|
||||||
├─────────────────────────────────────────┤
|
├─────────────────────────────────────────┤
|
||||||
│ │
|
│ │
|
||||||
│ ┌────────┐ ┌────────┐ │
|
│ ┌────────┐ ┌────────┐ │
|
||||||
│ │ State │────────▶│ State │ │
|
│ │ State │────────▶│ State │ │
|
||||||
│ │ A │ │ B │ │
|
│ │ A │ │ B │ │
|
||||||
│ └────────┘ └────────┘ │
|
│ └────────┘ └────────┘ │
|
||||||
│ │
|
│ │
|
||||||
│ System diagrams, state machines, │
|
│ System diagrams, state machines, │
|
||||||
│ data flows, architecture sketches, │
|
│ data flows, architecture sketches, │
|
||||||
|
|
@ -107,11 +110,10 @@ Think freely. When insights crystallize, you might offer:
|
||||||
|
|
||||||
If the user mentions a change or you detect one is relevant:
|
If the user mentions a change or you detect one is relevant:
|
||||||
|
|
||||||
1. **Read existing artifacts for context**
|
1. **Resolve and read existing artifacts for context**
|
||||||
- `openspec/changes/<name>/proposal.md`
|
- Run `openspec status --change "<name>" --json`.
|
||||||
- `openspec/changes/<name>/design.md`
|
- Use `changeRoot`, `artifactPaths`, and `actionContext` from the status JSON.
|
||||||
- `openspec/changes/<name>/tasks.md`
|
- Read existing files from `artifactPaths.<artifact>.existingOutputPaths`.
|
||||||
- etc.
|
|
||||||
|
|
||||||
2. **Reference them naturally in conversation**
|
2. **Reference them naturally in conversation**
|
||||||
- "Your design mentions using Redis, but we just realized SQLite fits better..."
|
- "Your design mentions using Redis, but we just realized SQLite fits better..."
|
||||||
|
|
@ -119,14 +121,14 @@ If the user mentions a change or you detect one is relevant:
|
||||||
|
|
||||||
3. **Offer to capture when decisions are made**
|
3. **Offer to capture when decisions are made**
|
||||||
|
|
||||||
| Insight Type | Where to Capture |
|
| Insight Type | Where to Capture |
|
||||||
|--------------|------------------|
|
|----------------------------|--------------------------------|
|
||||||
| New requirement discovered | `specs/<capability>/spec.md` |
|
| New requirement discovered | `specs/<capability>/spec.md` |
|
||||||
| Requirement changed | `specs/<capability>/spec.md` |
|
| Requirement changed | `specs/<capability>/spec.md` |
|
||||||
| Design decision made | `design.md` |
|
| Design decision made | `design.md` |
|
||||||
| Scope changed | `proposal.md` |
|
| Scope changed | `proposal.md` |
|
||||||
| New work identified | `tasks.md` |
|
| New work identified | `tasks.md` |
|
||||||
| Assumption invalidated | Relevant artifact |
|
| Assumption invalidated | Relevant artifact |
|
||||||
|
|
||||||
Example offers:
|
Example offers:
|
||||||
- "That's a design decision. Capture it in design.md?"
|
- "That's a design decision. Capture it in design.md?"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
name: "OPSX: Propose"
|
name: "OPSX: Propose"
|
||||||
description: Propose a new change - create it and generate all artifacts in one step
|
description: Propose a new change - create it and generate all artifacts in one step
|
||||||
|
allowed-tools: Bash(openspec:*)
|
||||||
category: Workflow
|
category: Workflow
|
||||||
tags: [workflow, artifacts, experimental]
|
tags: [workflow, artifacts, experimental]
|
||||||
---
|
---
|
||||||
|
|
@ -16,6 +17,8 @@ When ready to implement, run /opsx:apply
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
||||||
|
|
||||||
**Input**: The argument after `/opsx:propose` is the change name (kebab-case), OR a description of what the user wants to build.
|
**Input**: The argument after `/opsx:propose` is the change name (kebab-case), OR a description of what the user wants to build.
|
||||||
|
|
||||||
**Steps**
|
**Steps**
|
||||||
|
|
@ -33,7 +36,7 @@ When ready to implement, run /opsx:apply
|
||||||
```bash
|
```bash
|
||||||
openspec new change "<name>"
|
openspec new change "<name>"
|
||||||
```
|
```
|
||||||
This creates a scaffolded change at `openspec/changes/<name>/` with `.openspec.yaml`.
|
This creates a scaffolded change in the planning home resolved by the CLI with `.openspec.yaml`.
|
||||||
|
|
||||||
3. **Get the artifact build order**
|
3. **Get the artifact build order**
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -42,6 +45,7 @@ When ready to implement, run /opsx:apply
|
||||||
Parse the JSON to get:
|
Parse the JSON to get:
|
||||||
- `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
|
- `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
|
||||||
- `artifacts`: list of all artifacts with their status and dependencies
|
- `artifacts`: list of all artifacts with their status and dependencies
|
||||||
|
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context. Use these instead of assuming repo-local paths.
|
||||||
|
|
||||||
4. **Create artifacts in sequence until apply-ready**
|
4. **Create artifacts in sequence until apply-ready**
|
||||||
|
|
||||||
|
|
@ -59,10 +63,10 @@ When ready to implement, run /opsx:apply
|
||||||
- `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
|
- `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
|
||||||
- `template`: The structure to use for your output file
|
- `template`: The structure to use for your output file
|
||||||
- `instruction`: Schema-specific guidance for this artifact type
|
- `instruction`: Schema-specific guidance for this artifact type
|
||||||
- `outputPath`: Where to write the artifact
|
- `resolvedOutputPath`: Resolved path or pattern to write the artifact
|
||||||
- `dependencies`: Completed artifacts to read for context
|
- `dependencies`: Completed artifacts to read for context
|
||||||
- Read any completed dependency files for context
|
- Read any completed dependency files for context
|
||||||
- Create the artifact file using `template` as the structure
|
- Create the artifact file using `template` as the structure and write it to `resolvedOutputPath`
|
||||||
- Apply `context` and `rules` as constraints - but do NOT copy them into the file
|
- Apply `context` and `rules` as constraints - but do NOT copy them into the file
|
||||||
- Show brief progress: "Created <artifact-id>"
|
- Show brief progress: "Created <artifact-id>"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue