@ancleto/spec 0.6.4 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +1 -1
  2. package/agents/coder.md +11 -11
  3. package/agents/documenter.md +29 -27
  4. package/agents/orchestrator.md +8 -8
  5. package/agents/reviewer.md +13 -13
  6. package/agents/spec-writer.md +11 -10
  7. package/agents/technical-discovery.md +5 -5
  8. package/agents/technical-seed-writer.md +1 -1
  9. package/agents/tester.md +9 -9
  10. package/commands/cleto-apply.md +3 -155
  11. package/commands/cleto-archive.md +2 -164
  12. package/commands/cleto-bulk-archive.md +2 -248
  13. package/commands/cleto-continue.md +2 -126
  14. package/commands/cleto-explore.md +2 -174
  15. package/commands/cleto-ff.md +2 -122
  16. package/commands/cleto-new.md +2 -110
  17. package/commands/cleto-onboard.md +3 -563
  18. package/commands/cleto-propose.md +2 -132
  19. package/commands/cleto-recall.md +4 -52
  20. package/commands/cleto-sync.md +2 -137
  21. package/commands/cleto-verify.md +2 -169
  22. package/package.json +2 -2
  23. package/skills/ancleto-apply/SKILL.md +16 -39
  24. package/skills/ancleto-archive/SKILL.md +24 -26
  25. package/skills/ancleto-bulk-archive/SKILL.md +46 -56
  26. package/skills/ancleto-commit/SKILL.md +10 -29
  27. package/skills/ancleto-continue/SKILL.md +19 -25
  28. package/skills/ancleto-explore/SKILL.md +42 -69
  29. package/skills/ancleto-ff/SKILL.md +22 -30
  30. package/skills/ancleto-new/SKILL.md +23 -42
  31. package/skills/ancleto-onboard/SKILL.md +37 -40
  32. package/skills/ancleto-pr/SKILL.md +12 -26
  33. package/skills/ancleto-propose/SKILL.md +23 -70
  34. package/skills/ancleto-recall/SKILL.md +21 -25
  35. package/skills/ancleto-sync-specs/SKILL.md +29 -64
  36. package/skills/ancleto-upgrade/SKILL.md +134 -227
  37. package/skills/ancleto-upgrade/references/templates.md +138 -171
  38. package/skills/ancleto-verify/SKILL.md +37 -67
  39. package/skills/ancleto-workflow/SKILL.md +19 -19
  40. package/src/cli/index.js +53 -38
  41. package/templates/AGENTS.md +7 -4
  42. package/templates/PRODUCT.md +1 -1
@@ -2,132 +2,8 @@
2
2
  description: Continue working on a change - create the next artifact (Experimental)
3
3
  ---
4
4
 
5
- Continue working on a change by creating the next artifact.
5
+ Invoke the `ancleto-continue` skill with the Skill tool and follow it exactly; do not improvise steps.
6
6
 
7
7
  **Input**: Optionally specify a change name after `/cleto-continue` (e.g., `/cleto-continue add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
8
8
 
9
- **Steps**
10
-
11
- 1. **If no change name provided, prompt for selection**
12
-
13
- Run `openspec list --json` to get available changes sorted by most recently modified. Then use the **AskUserQuestion tool** to let the user select which change to work on.
14
-
15
- Present the top 3-4 most recently modified changes as options, showing:
16
-
17
- - Change name
18
- - Schema (from `schema` field if present, otherwise "spec-driven")
19
- - Status (e.g., "0/5 tasks", "complete", "no tasks")
20
- - How recently it was modified (from `lastModified` field)
21
-
22
- Mark the most recently modified change as "(Recommended)" since it's likely what the user wants to continue.
23
-
24
- **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
25
-
26
- 2. **Check current status**
27
-
28
- ```bash
29
- openspec status --change "<name>" --json
30
- ```
31
-
32
- Parse the JSON to understand current state. The response includes:
33
-
34
- - `schemaName`: The workflow schema being used (e.g., "spec-driven")
35
- - `artifacts`: Array of artifacts with their status ("done", "ready", "blocked")
36
- - `isComplete`: Boolean indicating if all artifacts are complete
37
-
38
- 3. **Load scaffold context files** (if not already loaded this session)
39
-
40
- If `context.md` for this change was already read earlier in the current session, skip this step — it is already in context.
41
-
42
- Otherwise, read it as background context — it is NOT an artifact and must NOT be included in output files, but its contents inform what you write:
43
-
44
- - `openspec/changes/<name>/context.md` — Work Item context (title, description, acceptance criteria)
45
-
46
- If either file is missing, skip silently.
47
-
48
- 4. **Act based on status**:
49
-
50
- ***
51
-
52
- **If all artifacts are complete (`isComplete: true`)**:
53
-
54
- - Congratulate the user
55
- - Show final status including the schema used
56
- - Suggest: "All artifacts created! You can now implement this change with `/cleto-apply` or archive it with `/cleto-archive`."
57
- - STOP
58
-
59
- ***
60
-
61
- **If artifacts are ready to create** (status shows artifacts with `status: "ready"`):
62
-
63
- - Pick the FIRST artifact with `status: "ready"` from the status output
64
- - Get its instructions:
65
- ```bash
66
- openspec instructions <artifact-id> --change "<name>" --json
67
- ```
68
- - Parse the JSON. The key fields are:
69
- - `context`: Project background (constraints for you - do NOT include in output)
70
- - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
71
- - `template`: The structure to use for your output file
72
- - `instruction`: Schema-specific guidance
73
- - `outputPath`: Where to write the artifact
74
- - `dependencies`: Completed artifacts to read for context
75
- - **Create the artifact file**:
76
- - Read any completed dependency files for context
77
- - If creating the **first artifact** (proposal):
78
- - If `context.md` was loaded with WI data (step 3): use the WI title/description as the problem statement, acceptance criteria as the requirements basis, and include a `## Related Work Item` section: `**#{id}** — {System.Title} ({WorkItemType}) · Project: {System.TeamProject}`
79
- - Use `template` as the structure - fill in its sections
80
- - Apply `context` and `rules` as constraints when writing - but do NOT copy them into the file
81
- - Write to the output path specified in instructions
82
- - Show what was created and what's now unlocked
83
- - STOP after creating ONE artifact
84
-
85
- ***
86
-
87
- **If no artifacts are ready (all blocked)**:
88
-
89
- - This shouldn't happen with a valid schema
90
- - Show status and suggest checking for issues
91
-
92
- 5. **After creating an artifact, show progress**
93
- ```bash
94
- openspec status --change "<name>"
95
- ```
96
-
97
- **Output**
98
-
99
- After each invocation, show:
100
-
101
- - Which artifact was created
102
- - Schema workflow being used
103
- - Current progress (N/M complete)
104
- - What artifacts are now unlocked
105
- - Prompt: "Run `/cleto-continue` to create the next artifact"
106
-
107
- **Artifact Creation Guidelines**
108
-
109
- The artifact types and their purpose depend on the schema. Use the `instruction` field from the instructions output to understand what to create.
110
-
111
- Common artifact patterns:
112
-
113
- **spec-driven schema** (proposal → specs → design → tasks):
114
-
115
- - **proposal.md**: Ask user about the change if not clear. Fill in Why, What Changes, Capabilities, Impact.
116
- - The Capabilities section is critical - each capability listed will need a spec file.
117
- - **specs/<capability>/spec.md**: Create one spec per capability listed in the proposal's Capabilities section (use the capability name, not the change name).
118
- - **design.md**: Document technical decisions, architecture, and implementation approach.
119
- - **tasks.md**: Break down implementation into checkboxed tasks.
120
-
121
- For other schemas, follow the `instruction` field from the CLI output.
122
-
123
- **Guardrails**
124
-
125
- - Create ONE artifact per invocation
126
- - Always read dependency artifacts before creating a new one
127
- - Never skip artifacts or create out of order
128
- - If context is unclear, ask the user before creating
129
- - Verify the artifact file exists after writing before marking progress
130
- - Use the schema's artifact sequence, don't assume specific artifact names
131
- - **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
132
- - Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
133
- - These guide what you write, but should never appear in the output
9
+ Work Item grounding (when the request references a Work Item) is owned by `@context-resolver`.
@@ -2,180 +2,8 @@
2
2
  description: Enter explore mode - think through ideas, investigate problems, clarify requirements
3
3
  ---
4
4
 
5
- Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
6
-
7
- **IMPORTANT: Explore mode is for thinking, not implementing.** You may read files, search code, and investigate the codebase, but you must NEVER write code or implement features. If the user asks you to implement something, remind them to exit explore mode first and create a change proposal. You MAY create OpenSpec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing.
8
-
9
- **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.
5
+ Invoke the `ancleto-explore` skill with the Skill tool and follow it exactly; do not improvise steps.
10
6
 
11
7
  **Input**: The argument after `/cleto-explore` is whatever the user wants to think about. Could be:
12
8
 
13
- - A vague idea: "real-time collaboration"
14
- - A specific problem: "the auth system is getting unwieldy"
15
- - A change name: "add-dark-mode" (to explore in context of that change)
16
- - A comparison: "postgres vs sqlite for this"
17
- - Nothing (just enter explore mode)
18
-
19
- ---
20
-
21
- ## The Stance
22
-
23
- - **Curious, not prescriptive** - Ask questions that emerge naturally, don't follow a script
24
- - **Open threads, not interrogations** - Surface multiple interesting directions and let the user follow what resonates. Don't funnel them through a single path of questions.
25
- - **Visual** - Use ASCII diagrams liberally when they'd help clarify thinking
26
- - **Adaptive** - Follow interesting threads, pivot when new information emerges
27
- - **Patient** - Don't rush to conclusions, let the shape of the problem emerge
28
- - **Grounded** - Explore the actual codebase when relevant, don't just theorize
29
-
30
- ---
31
-
32
- ## What You Might Do
33
-
34
- Depending on what the user brings, you might:
35
-
36
- **Explore the problem space**
37
-
38
- - Ask clarifying questions that emerge from what they said
39
- - Challenge assumptions
40
- - Reframe the problem
41
- - Find analogies
42
-
43
- **Investigate the codebase**
44
-
45
- - Map existing architecture relevant to the discussion
46
- - Find integration points
47
- - Identify patterns already in use
48
- - Surface hidden complexity
49
-
50
- **Compare options**
51
-
52
- - Brainstorm multiple approaches
53
- - Build comparison tables
54
- - Sketch tradeoffs
55
- - Recommend a path (if asked)
56
-
57
- **Visualize**
58
-
59
- ```
60
- ┌─────────────────────────────────────────┐
61
- │ Use ASCII diagrams liberally │
62
- ├─────────────────────────────────────────┤
63
- │ │
64
- │ ┌────────┐ ┌────────┐ │
65
- │ │ State │────────▶│ State │ │
66
- │ │ A │ │ B │ │
67
- │ └────────┘ └────────┘ │
68
- │ │
69
- │ System diagrams, state machines, │
70
- │ data flows, architecture sketches, │
71
- │ dependency graphs, comparison tables │
72
- │ │
73
- └─────────────────────────────────────────┘
74
- ```
75
-
76
- **Surface risks and unknowns**
77
-
78
- - Identify what could go wrong
79
- - Find gaps in understanding
80
- - Suggest spikes or investigations
81
-
82
- ---
83
-
84
- ## OpenSpec Awareness
85
-
86
- You have full context of the OpenSpec system. Use it naturally, don't force it.
87
-
88
- ### Check for context
89
-
90
- At the start, quickly check what exists:
91
-
92
- ```bash
93
- openspec list --json
94
- ```
95
-
96
- This tells you:
97
-
98
- - If there are active changes
99
- - Their names, schemas, and status
100
- - What the user might be working on
101
-
102
- If the user mentioned a specific change name, read its artifacts for context.
103
-
104
- ### When no change exists
105
-
106
- Think freely. When insights crystallize, you might offer:
107
-
108
- - "This feels solid enough to start a change. Want me to create a proposal?"
109
- - Or keep exploring - no pressure to formalize
110
-
111
- ### When a change exists
112
-
113
- If the user mentions a change or you detect one is relevant:
114
-
115
- 1. **Read existing artifacts for context**
116
-
117
- - `openspec/changes/<name>/proposal.md`
118
- - `openspec/changes/<name>/design.md`
119
- - `openspec/changes/<name>/tasks.md`
120
- - etc.
121
-
122
- 2. **Reference them naturally in conversation**
123
-
124
- - "Your design mentions using Redis, but we just realized SQLite fits better..."
125
- - "The proposal scopes this to premium users, but we're now thinking everyone..."
126
-
127
- 3. **Offer to capture when decisions are made**
128
-
129
- | Insight Type | Where to Capture |
130
- | -------------------------- | ---------------------------- |
131
- | New requirement discovered | `specs/<capability>/spec.md` |
132
- | Requirement changed | `specs/<capability>/spec.md` |
133
- | Design decision made | `design.md` |
134
- | Scope changed | `proposal.md` |
135
- | New work identified | `tasks.md` |
136
- | Assumption invalidated | Relevant artifact |
137
-
138
- Example offers:
139
-
140
- - "That's a design decision. Capture it in design.md?"
141
- - "This is a new requirement. Add it to specs?"
142
- - "This changes scope. Update the proposal?"
143
-
144
- 4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
145
-
146
- ---
147
-
148
- ## What You Don't Have To Do
149
-
150
- - Follow a script
151
- - Ask the same questions every time
152
- - Produce a specific artifact
153
- - Reach a conclusion
154
- - Stay on topic if a tangent is valuable
155
- - Be brief (this is thinking time)
156
-
157
- ---
158
-
159
- ## Ending Discovery
160
-
161
- There's no required ending. Discovery might:
162
-
163
- - **Flow into a proposal**: "Ready to start? I can create a change proposal."
164
- - **Result in artifact updates**: "Updated design.md with these decisions"
165
- - **Just provide clarity**: User has what they need, moves on
166
- - **Continue later**: "We can pick this up anytime"
167
-
168
- When things crystallize, you might offer a summary - but it's optional. Sometimes the thinking IS the value.
169
-
170
- ---
171
-
172
- ## Guardrails
173
-
174
- - **Don't implement** - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
175
- - **Don't fake understanding** - If something is unclear, dig deeper
176
- - **Don't rush** - Discovery is thinking time, not task time
177
- - **Don't force structure** - Let patterns emerge naturally
178
- - **Don't auto-capture** - Offer to save insights, don't just do it
179
- - **Do visualize** - A good diagram is worth many paragraphs
180
- - **Do explore the codebase** - Ground discussions in reality
181
- - **Do question assumptions** - Including the user's and your own
9
+ Work Item grounding (when the request references a Work Item) is owned by `@context-resolver`.
@@ -2,128 +2,8 @@
2
2
  description: Create a change and generate all artifacts needed for implementation in one go
3
3
  ---
4
4
 
5
- Fast-forward through artifact creation - generate everything needed to start implementation.
5
+ Invoke the `ancleto-ff` skill with the Skill tool and follow it exactly; do not improvise steps.
6
6
 
7
7
  **Input**: The argument after `/cleto-ff` is the change name (kebab-case), OR a description of what the user wants to build.
8
8
 
9
- **Steps**
10
-
11
- 1. **Resolve Work Item context and derive change name**
12
-
13
- Resolve Work Item context in this order — stop at the first source that yields data:
14
-
15
- a. **In-session context** — If WI data was already fetched in this session, use it. Proceed to name derivation below.
16
- b. **`context.md`** — If a change name was provided as argument and `openspec/changes/<name>/context.md` exists, read it and use its content. Proceed to name derivation.
17
- c. **Ask the user** — Use the **AskUserQuestion tool** to ask for the Work Item reference. Two accepted formats:
18
-
19
- - **ID + Project** — e.g., ID `12345` and project `MyProject`
20
- - **Full URL** — e.g., `https://dev.azure.com/org/MyProject/_workitems/edit/12345`
21
-
22
- > "Do you have an Azure DevOps Work Item for this change? Provide the Work Item ID and Azure DevOps project name (e.g., ID: `12345`, Project: `MyProject`), or paste the full Work Item URL. Skip to describe the change manually."
23
-
24
- **If WI provided:**
25
-
26
- - If URL provided: extract numeric ID (pattern: `_workitems/edit/{id}`) AND project name (pattern: `/{org}/{project}/_workitems/`)
27
- - Use BOTH `id` AND `project` when calling the AzDO MCP (`wit_get_work_item`) — never call with ID alone
28
- - Extract from the response: `System.Id`, `System.Title`, `System.Description`, `Microsoft.VSTS.Common.AcceptanceCriteria`, `System.WorkItemType`
29
- - Suggest a kebab-case name derived from `System.Title` (e.g., "Add payment gateway" → `add-payment-gateway`)
30
- - Let the user accept or modify the suggested name before proceeding
31
-
32
- **If skipped:**
33
-
34
- - Display: "No work item linked — consider linking one for traceability."
35
- - If no change name was provided as argument, ask what they want to build:
36
- > "What change do you want to work on? Describe what you want to build or fix."
37
- - Derive a kebab-case name from the description.
38
-
39
- WI context is held **in-memory** for this flow — no `context.md` is written.
40
-
41
- **IMPORTANT**: Do NOT proceed without a change name.
42
-
43
- 2. **Create the change directory**
44
-
45
- ```bash
46
- openspec new change "<name>"
47
- ```
48
-
49
- This creates a scaffolded change at `openspec/changes/<name>/`.
50
-
51
- 3. **Get the artifact build order**
52
-
53
- ```bash
54
- openspec status --change "<name>" --json
55
- ```
56
-
57
- Parse the JSON to get:
58
-
59
- - `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
60
- - `artifacts`: list of all artifacts with their status and dependencies
61
-
62
- 4. **Create artifacts in sequence until apply-ready**
63
-
64
- Use the **TodoWrite tool** to track progress through the artifacts.
65
-
66
- Loop through artifacts in dependency order (artifacts with no pending dependencies first):
67
-
68
- a. **For each artifact that is `ready` (dependencies satisfied)**:
69
-
70
- - Get instructions:
71
- ```bash
72
- openspec instructions <artifact-id> --change "<name>" --json
73
- ```
74
- - The instructions JSON includes:
75
- - `context`: Project background (constraints for you - do NOT include in output)
76
- - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
77
- - `template`: The structure to use for your output file
78
- - `instruction`: Schema-specific guidance for this artifact type
79
- - `outputPath`: Where to write the artifact
80
- - `dependencies`: Completed artifacts to read for context
81
- - Read any completed dependency files for context
82
- - If creating the first artifact (proposal):
83
- - If WI context is available (in-memory): use WI title/description as the problem statement, acceptance criteria as the requirements basis, and include a `## Related Work Item` section: `**#{id}** — {System.Title} ({WorkItemType}) · Project: {System.TeamProject}`
84
- - Create the artifact file using `template` as the structure
85
- - Apply `context` and `rules` as constraints - but do NOT copy them into the file
86
- - Show brief progress: "✓ Created <artifact-id>"
87
-
88
- b. **Continue until all `applyRequires` artifacts are complete**
89
-
90
- - After creating each artifact, re-run `openspec status --change "<name>" --json`
91
- - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
92
- - Stop when all `applyRequires` artifacts are done
93
-
94
- c. **If an artifact requires user input** (unclear context):
95
-
96
- - Use **AskUserQuestion tool** to clarify
97
- - Then continue with creation
98
-
99
- 5. **Show final status**
100
- ```bash
101
- openspec status --change "<name>"
102
- ```
103
-
104
- **Output**
105
-
106
- After completing all artifacts, summarize:
107
-
108
- - Change name and location
109
- - List of artifacts created with brief descriptions
110
- - What's ready: "All artifacts created! Ready for implementation."
111
- - Prompt: "Run `/cleto-apply` to start implementing."
112
-
113
- **Artifact Creation Guidelines**
114
-
115
- - Follow the `instruction` field from `openspec instructions` for each artifact type
116
- - The schema defines what each artifact should contain - follow it
117
- - Read dependency artifacts for context before creating new ones
118
- - Use `template` as the structure for your output file - fill in its sections
119
- - **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
120
- - Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
121
- - These guide what you write, but should never appear in the output
122
-
123
- **Guardrails**
124
-
125
- - Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
126
- - Always read dependency artifacts before creating a new one
127
- - If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
128
- - If a change with that name already exists, ask if user wants to continue it or create a new one
129
- - Verify each artifact file exists after writing before proceeding to next
9
+ Work Item grounding (when the request references a Work Item) is owned by `@context-resolver`.
@@ -2,116 +2,8 @@
2
2
  description: Start a new change using the experimental artifact workflow
3
3
  ---
4
4
 
5
- Start a new change using the experimental artifact-driven approach.
5
+ Invoke the `ancleto-new` skill with the Skill tool and follow it exactly; do not improvise steps.
6
6
 
7
7
  **Input**: The argument after `/cleto-new` is the change name (kebab-case), OR a description of what the user wants to build.
8
8
 
9
- **Steps**
10
-
11
- 1. **Resolve Work Item context and derive change name**
12
-
13
- Resolve Work Item context in this order — stop at the first source that yields data:
14
-
15
- a. **In-session context** — If WI data was already fetched in this session, use it. Proceed to name derivation below.
16
- b. **`context.md`** — If a change name was provided as argument and `openspec/changes/<name>/context.md` exists, read it and use its content. Proceed to name derivation.
17
- c. **Ask the user** — Use the **AskUserQuestion tool** to ask for the Work Item reference. Two accepted formats:
18
-
19
- - **ID + Project** — e.g., ID `12345` and project `MyProject`
20
- - **Full URL** — e.g., `https://dev.azure.com/org/MyProject/_workitems/edit/12345`
21
-
22
- > "Do you have an Azure DevOps Work Item for this change? Provide the Work Item ID and Azure DevOps project name (e.g., ID: `12345`, Project: `MyProject`), or paste the full Work Item URL. Skip to describe the change manually."
23
-
24
- **If WI provided:**
25
-
26
- - If URL provided: extract numeric ID (pattern: `_workitems/edit/{id}`) AND project name (pattern: `/{org}/{project}/_workitems/`)
27
- - Use BOTH `id` AND `project` when calling the AzDO MCP (`wit_get_work_item`) — never call with ID alone
28
- - Extract from the response: `System.Id`, `System.Title`, `System.Description`, `Microsoft.VSTS.Common.AcceptanceCriteria`, `System.WorkItemType`
29
- - Suggest a kebab-case name derived from `System.Title` (e.g., "Add payment gateway" → `add-payment-gateway`)
30
- - Let the user accept or modify the suggested name before proceeding
31
-
32
- **If skipped:**
33
-
34
- - Display: "No work item linked — consider linking one for traceability."
35
- - If no change name was provided as argument, ask what they want to build:
36
- > "What change do you want to work on? Describe what you want to build or fix."
37
- - Derive a kebab-case name from the description.
38
-
39
- **IMPORTANT**: Do NOT proceed without a change name.
40
-
41
- 2. **Determine the workflow schema**
42
-
43
- Use the default schema (omit `--schema`) unless the user explicitly requests a different workflow.
44
-
45
- **Use a different schema only if the user mentions:**
46
-
47
- - A specific schema name → use `--schema <name>`
48
- - "show workflows" or "what workflows" → run `openspec schemas --json` and let them choose
49
-
50
- **Otherwise**: Omit `--schema` to use the default.
51
-
52
- 3. **Create the change directory**
53
-
54
- ```bash
55
- openspec new change "<name>"
56
- ```
57
-
58
- Add `--schema <name>` only if the user requested a specific workflow.
59
- This creates a scaffolded change at `openspec/changes/<name>/` with the selected schema.
60
-
61
- 4. **Persist Work Item context to `context.md`** (only if WI was resolved in step 1)
62
-
63
- Write WI context to `openspec/changes/<name>/context.md`:
64
-
65
- ```
66
- # Work Item Context
67
-
68
- **ID**: #{id}
69
- **Type**: {WorkItemType}
70
- **Title**: {System.Title}
71
- **Project**: {System.TeamProject}
72
-
73
- ## Description
74
- {System.Description (HTML stripped)}
75
-
76
- ## Acceptance Criteria
77
- {Microsoft.VSTS.Common.AcceptanceCriteria (HTML stripped)}
78
- ```
79
-
80
- Skip this step if the user skipped the Work Item step.
81
-
82
- 5. **Show the artifact status**
83
-
84
- ```bash
85
- openspec status --change "<name>"
86
- ```
87
-
88
- This shows which artifacts need to be created and which are ready (dependencies satisfied).
89
-
90
- 6. **Get instructions for the first artifact**
91
- The first artifact depends on the schema. Check the status output to find the first artifact with status "ready".
92
-
93
- ```bash
94
- openspec instructions <first-artifact-id> --change "<name>"
95
- ```
96
-
97
- This outputs the template and context for creating the first artifact.
98
-
99
- 7. **STOP and wait for user direction**
100
-
101
- **Output**
102
-
103
- After completing the steps, summarize:
104
-
105
- - Change name and location
106
- - Schema/workflow being used and its artifact sequence
107
- - Current status (0/N artifacts complete)
108
- - The template for the first artifact
109
- - Prompt: "Ready to create the first artifact? Run `/cleto-continue` or just describe what this change is about and I'll draft it."
110
-
111
- **Guardrails**
112
-
113
- - Do NOT create any artifacts yet - just show the instructions
114
- - Do NOT advance beyond showing the first artifact template
115
- - If the name is invalid (not kebab-case), ask for a valid name
116
- - If a change with that name already exists, suggest using `/cleto-continue` instead
117
- - Pass --schema if using a non-default workflow
9
+ Work Item grounding (when the request references a Work Item) is owned by `@context-resolver`.