agent-orchestrator-kit 0.1.0 → 0.1.2
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.
- package/README.md +73 -43
- package/bin/agent-orchestrator.js +39 -17
- package/package.json +6 -5
- package/templates/.agents/amp.settings.json.example +11 -0
- package/templates/.agents/skills/openspec-apply-change/SKILL.md +159 -0
- package/templates/.agents/skills/openspec-archive-change/SKILL.md +117 -0
- package/templates/.agents/skills/openspec-explore/SKILL.md +287 -0
- package/templates/.agents/skills/openspec-howto/SKILL.md +237 -0
- package/templates/.agents/skills/openspec-propose/SKILL.md +111 -0
- package/templates/.agents/skills/openspec-sync-specs/SKILL.md +147 -0
- package/templates/.agents/skills/spec-workflow-openspec/SKILL.md +59 -0
- package/templates/.github/workflows/agent-verify.yml +31 -0
- package/templates/scripts/sync-local-agent-skills.sh +6 -3
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-explore
|
|
3
|
+
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.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires openspec CLI.
|
|
6
|
+
metadata:
|
|
7
|
+
author: openspec
|
|
8
|
+
version: "1.0"
|
|
9
|
+
generatedBy: "1.4.1"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
|
|
13
|
+
|
|
14
|
+
**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.
|
|
15
|
+
|
|
16
|
+
**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.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## The Stance
|
|
21
|
+
|
|
22
|
+
- **Curious, not prescriptive** - Ask questions that emerge naturally, don't follow a script
|
|
23
|
+
- **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.
|
|
24
|
+
- **Visual** - Use ASCII diagrams liberally when they'd help clarify thinking
|
|
25
|
+
- **Adaptive** - Follow interesting threads, pivot when new information emerges
|
|
26
|
+
- **Patient** - Don't rush to conclusions, let the shape of the problem emerge
|
|
27
|
+
- **Grounded** - Explore the actual codebase when relevant, don't just theorize
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## What You Might Do
|
|
32
|
+
|
|
33
|
+
Depending on what the user brings, you might:
|
|
34
|
+
|
|
35
|
+
**Explore the problem space**
|
|
36
|
+
- Ask clarifying questions that emerge from what they said
|
|
37
|
+
- Challenge assumptions
|
|
38
|
+
- Reframe the problem
|
|
39
|
+
- Find analogies
|
|
40
|
+
|
|
41
|
+
**Investigate the codebase**
|
|
42
|
+
- Map existing architecture relevant to the discussion
|
|
43
|
+
- Find integration points
|
|
44
|
+
- Identify patterns already in use
|
|
45
|
+
- Surface hidden complexity
|
|
46
|
+
|
|
47
|
+
**Compare options**
|
|
48
|
+
- Brainstorm multiple approaches
|
|
49
|
+
- Build comparison tables
|
|
50
|
+
- Sketch tradeoffs
|
|
51
|
+
- Recommend a path (if asked)
|
|
52
|
+
|
|
53
|
+
**Visualize**
|
|
54
|
+
```
|
|
55
|
+
┌─────────────────────────────────────────┐
|
|
56
|
+
│ Use ASCII diagrams liberally │
|
|
57
|
+
├─────────────────────────────────────────┤
|
|
58
|
+
│ │
|
|
59
|
+
│ ┌────────┐ ┌────────┐ │
|
|
60
|
+
│ │ State │────────▶│ State │ │
|
|
61
|
+
│ │ A │ │ B │ │
|
|
62
|
+
│ └────────┘ └────────┘ │
|
|
63
|
+
│ │
|
|
64
|
+
│ System diagrams, state machines, │
|
|
65
|
+
│ data flows, architecture sketches, │
|
|
66
|
+
│ dependency graphs, comparison tables │
|
|
67
|
+
│ │
|
|
68
|
+
└─────────────────────────────────────────┘
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Surface risks and unknowns**
|
|
72
|
+
- Identify what could go wrong
|
|
73
|
+
- Find gaps in understanding
|
|
74
|
+
- Suggest spikes or investigations
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## OpenSpec Awareness
|
|
79
|
+
|
|
80
|
+
You have full context of the OpenSpec system. Use it naturally, don't force it.
|
|
81
|
+
|
|
82
|
+
### Check for context
|
|
83
|
+
|
|
84
|
+
At the start, quickly check what exists:
|
|
85
|
+
```bash
|
|
86
|
+
openspec list --json
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
This tells you:
|
|
90
|
+
- If there are active changes
|
|
91
|
+
- Their names, schemas, and status
|
|
92
|
+
- What the user might be working on
|
|
93
|
+
|
|
94
|
+
### When no change exists
|
|
95
|
+
|
|
96
|
+
Think freely. When insights crystallize, you might offer:
|
|
97
|
+
|
|
98
|
+
- "This feels solid enough to start a change. Want me to create a proposal?"
|
|
99
|
+
- Or keep exploring - no pressure to formalize
|
|
100
|
+
|
|
101
|
+
### When a change exists
|
|
102
|
+
|
|
103
|
+
If the user mentions a change or you detect one is relevant:
|
|
104
|
+
|
|
105
|
+
1. **Resolve and read existing artifacts for context**
|
|
106
|
+
- Run `openspec status --change "<name>" --json`.
|
|
107
|
+
- Use `changeRoot`, `artifactPaths`, and `actionContext` from the status JSON.
|
|
108
|
+
- Read existing files from `artifactPaths.<artifact>.existingOutputPaths`.
|
|
109
|
+
|
|
110
|
+
2. **Reference them naturally in conversation**
|
|
111
|
+
- "Your design mentions using Redis, but we just realized SQLite fits better..."
|
|
112
|
+
- "The proposal scopes this to premium users, but we're now thinking everyone..."
|
|
113
|
+
|
|
114
|
+
3. **Offer to capture when decisions are made**
|
|
115
|
+
|
|
116
|
+
| Insight Type | Where to Capture |
|
|
117
|
+
|----------------------------|--------------------------------|
|
|
118
|
+
| New requirement discovered | `specs/<capability>/spec.md` |
|
|
119
|
+
| Requirement changed | `specs/<capability>/spec.md` |
|
|
120
|
+
| Design decision made | `design.md` |
|
|
121
|
+
| Scope changed | `proposal.md` |
|
|
122
|
+
| New work identified | `tasks.md` |
|
|
123
|
+
| Assumption invalidated | Relevant artifact |
|
|
124
|
+
|
|
125
|
+
Example offers:
|
|
126
|
+
- "That's a design decision. Capture it in design.md?"
|
|
127
|
+
- "This is a new requirement. Add it to specs?"
|
|
128
|
+
- "This changes scope. Update the proposal?"
|
|
129
|
+
|
|
130
|
+
4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## What You Don't Have To Do
|
|
135
|
+
|
|
136
|
+
- Follow a script
|
|
137
|
+
- Ask the same questions every time
|
|
138
|
+
- Produce a specific artifact
|
|
139
|
+
- Reach a conclusion
|
|
140
|
+
- Stay on topic if a tangent is valuable
|
|
141
|
+
- Be brief (this is thinking time)
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Handling Different Entry Points
|
|
146
|
+
|
|
147
|
+
**User brings a vague idea:**
|
|
148
|
+
```
|
|
149
|
+
User: I'm thinking about adding real-time collaboration
|
|
150
|
+
|
|
151
|
+
You: Real-time collab is a big space. Let me think about this...
|
|
152
|
+
|
|
153
|
+
COLLABORATION SPECTRUM
|
|
154
|
+
════════════════════════════════════════════
|
|
155
|
+
|
|
156
|
+
Awareness Coordination Sync
|
|
157
|
+
│ │ │
|
|
158
|
+
▼ ▼ ▼
|
|
159
|
+
┌────────┐ ┌────────┐ ┌────────┐
|
|
160
|
+
│Presence│ │Cursors │ │ CRDT │
|
|
161
|
+
│ "3 │ │ Multi │ │Conflict│
|
|
162
|
+
│online" │ │ select │ │ free │
|
|
163
|
+
└────────┘ └────────┘ └────────┘
|
|
164
|
+
│ │ │
|
|
165
|
+
trivial moderate complex
|
|
166
|
+
|
|
167
|
+
Where's your head at?
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**User brings a specific problem:**
|
|
171
|
+
```
|
|
172
|
+
User: The auth system is a mess
|
|
173
|
+
|
|
174
|
+
You: [reads codebase]
|
|
175
|
+
|
|
176
|
+
┌─────────────────────────────────────────────┐
|
|
177
|
+
│ CURRENT AUTH FLOW │
|
|
178
|
+
└─────────────────────────────────────────────┘
|
|
179
|
+
│
|
|
180
|
+
┌─────────────┼─────────────┐
|
|
181
|
+
▼ ▼ ▼
|
|
182
|
+
┌─────────┐ ┌─────────┐ ┌─────────┐
|
|
183
|
+
│ Google │ │ GitHub │ │ Email │
|
|
184
|
+
│ OAuth │ │ OAuth │ │ Magic │
|
|
185
|
+
└────┬────┘ └────┬────┘ └────┬────┘
|
|
186
|
+
│ │ │
|
|
187
|
+
└─────────────┼─────────────┘
|
|
188
|
+
▼
|
|
189
|
+
┌───────────┐
|
|
190
|
+
│ Session │
|
|
191
|
+
└─────┬─────┘
|
|
192
|
+
│
|
|
193
|
+
▼
|
|
194
|
+
┌───────────┐
|
|
195
|
+
│ Perms │
|
|
196
|
+
└───────────┘
|
|
197
|
+
|
|
198
|
+
I see three tangles. Which one's burning?
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**User is stuck mid-implementation:**
|
|
202
|
+
```
|
|
203
|
+
User: /opsx:explore add-auth-system
|
|
204
|
+
The OAuth integration is more complex than expected
|
|
205
|
+
|
|
206
|
+
You: [reads change artifacts]
|
|
207
|
+
|
|
208
|
+
You're on task 4: "Implement OAuth flow"
|
|
209
|
+
|
|
210
|
+
Let me trace what's involved...
|
|
211
|
+
|
|
212
|
+
[draws diagram, explores options, suggests paths]
|
|
213
|
+
|
|
214
|
+
Want to update the design to reflect this?
|
|
215
|
+
Or add a spike task to investigate?
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**User wants to compare options:**
|
|
219
|
+
```
|
|
220
|
+
User: Should we use Postgres or SQLite?
|
|
221
|
+
|
|
222
|
+
You: Generic answer is boring. What's the context?
|
|
223
|
+
|
|
224
|
+
User: A CLI tool that tracks local dev environments
|
|
225
|
+
|
|
226
|
+
You: That changes everything.
|
|
227
|
+
|
|
228
|
+
┌─────────────────────────────────────────────────┐
|
|
229
|
+
│ CLI TOOL DATA STORAGE │
|
|
230
|
+
└─────────────────────────────────────────────────┘
|
|
231
|
+
|
|
232
|
+
Key constraints:
|
|
233
|
+
• No daemon running
|
|
234
|
+
• Must work offline
|
|
235
|
+
• Single user
|
|
236
|
+
|
|
237
|
+
SQLite Postgres
|
|
238
|
+
Deployment embedded ✓ needs server ✗
|
|
239
|
+
Offline yes ✓ no ✗
|
|
240
|
+
Single file yes ✓ no ✗
|
|
241
|
+
|
|
242
|
+
SQLite. Not even close.
|
|
243
|
+
|
|
244
|
+
Unless... is there a sync component?
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Ending Discovery
|
|
250
|
+
|
|
251
|
+
There's no required ending. Discovery might:
|
|
252
|
+
|
|
253
|
+
- **Flow into a proposal**: "Ready to start? I can create a change proposal."
|
|
254
|
+
- **Result in artifact updates**: "Updated design.md with these decisions"
|
|
255
|
+
- **Just provide clarity**: User has what they need, moves on
|
|
256
|
+
- **Continue later**: "We can pick this up anytime"
|
|
257
|
+
|
|
258
|
+
When it feels like things are crystallizing, you might summarize:
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
## What We Figured Out
|
|
262
|
+
|
|
263
|
+
**The problem**: [crystallized understanding]
|
|
264
|
+
|
|
265
|
+
**The approach**: [if one emerged]
|
|
266
|
+
|
|
267
|
+
**Open questions**: [if any remain]
|
|
268
|
+
|
|
269
|
+
**Next steps** (if ready):
|
|
270
|
+
- Create a change proposal
|
|
271
|
+
- Keep exploring: just keep talking
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
But this summary is optional. Sometimes the thinking IS the value.
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Guardrails
|
|
279
|
+
|
|
280
|
+
- **Don't implement** - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
|
|
281
|
+
- **Don't fake understanding** - If something is unclear, dig deeper
|
|
282
|
+
- **Don't rush** - Discovery is thinking time, not task time
|
|
283
|
+
- **Don't force structure** - Let patterns emerge naturally
|
|
284
|
+
- **Don't auto-capture** - Offer to save insights, don't just do it
|
|
285
|
+
- **Do visualize** - A good diagram is worth many paragraphs
|
|
286
|
+
- **Do explore the codebase** - Ground discussions in reality
|
|
287
|
+
- **Do question assumptions** - Including the user's and your own
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-howto
|
|
3
|
+
description: Посібник з використання OpenSpec CLI (@fission-ai/openspec) у проєктах. Команди /opsx:explore, /opsx:propose, /opsx:apply, /opsx:archive — коли використовувати кожну; CLI list, validate, status, show — що роблять і коли; як називати changes, delta-спеки, артефакти, типові сценарії. Використовуй коли користувач питає "як працює OpenSpec", "openspec list validate status show", "/opsx", "openspec workflow", "як архівувати change".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# OpenSpec — посібник
|
|
7
|
+
|
|
8
|
+
Spec-driven workflow на базі `@fission-ai/openspec` (профіль `core`).
|
|
9
|
+
|
|
10
|
+
## Архітектура
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
openspec/
|
|
14
|
+
├── config.yaml # контекст проєкту для AI
|
|
15
|
+
├── specs/ # source of truth після archive
|
|
16
|
+
│ └── <domain>/spec.md
|
|
17
|
+
└── changes/
|
|
18
|
+
├── <change-name>/
|
|
19
|
+
│ ├── proposal.md
|
|
20
|
+
│ ├── design.md
|
|
21
|
+
│ ├── tasks.md
|
|
22
|
+
│ └── specs/<domain>/spec.md # delta
|
|
23
|
+
└── archive/
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
- `changes/` — активна робота
|
|
27
|
+
- `specs/` — як працює система (через archive)
|
|
28
|
+
|
|
29
|
+
## Чотири команди
|
|
30
|
+
|
|
31
|
+
### `/opsx:explore`
|
|
32
|
+
**Коли:** скоуп неясний, треба обговорити підхід.
|
|
33
|
+
**Що робить:** Q&A, пошук по коду, без файлів.
|
|
34
|
+
|
|
35
|
+
### `/opsx:propose <kebab-name>`
|
|
36
|
+
**Коли:** є чітка задача — фіча або серйозний баг.
|
|
37
|
+
**Що робить:** створює `openspec/changes/<name>/` з proposal/design/tasks/specs.
|
|
38
|
+
**Іменування:** `add-...`, `fix-...`, `refactor-...`, `migrate-...`.
|
|
39
|
+
|
|
40
|
+
### `/opsx:apply`
|
|
41
|
+
**Коли:** артефакти переглянуто, план затверджено.
|
|
42
|
+
**Що робить:** виконує `tasks.md`, пише код, ставить `[x]`.
|
|
43
|
+
|
|
44
|
+
### `/opsx:archive`
|
|
45
|
+
**Коли:** код merged у dev/main, build/lint OK.
|
|
46
|
+
**Що робить:** мерджить delta у `openspec/specs/<domain>/spec.md` (ADDED/MODIFIED/REMOVED) і переносить change у `archive/`.
|
|
47
|
+
|
|
48
|
+
## Цикл
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
ідея → /opsx:explore (опційно) → /opsx:propose <name>
|
|
52
|
+
→ review артефактів → /opsx:apply
|
|
53
|
+
→ npm run build → merge → /opsx:archive
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## CLI (read-only — не змінює код)
|
|
57
|
+
|
|
58
|
+
| Команда | Навіщо |
|
|
59
|
+
|---------|--------|
|
|
60
|
+
| `list` | Активні changes або specs |
|
|
61
|
+
| `validate` | Формат артефактів (не Vue-код) |
|
|
62
|
+
| `status` | Прогрес артефактів одного change |
|
|
63
|
+
| `show` | Вміст change/spec у термінал |
|
|
64
|
+
|
|
65
|
+
### list
|
|
66
|
+
```bash
|
|
67
|
+
npm run openspec:list
|
|
68
|
+
npx openspec list --specs --sort name --json
|
|
69
|
+
```
|
|
70
|
+
Вивід: назва, `N/M tasks`, час оновлення.
|
|
71
|
+
|
|
72
|
+
### validate
|
|
73
|
+
```bash
|
|
74
|
+
npm run openspec:validate
|
|
75
|
+
npx openspec validate <name> --strict --type change
|
|
76
|
+
```
|
|
77
|
+
✓/✗ по кожному change. Якщо ✗ — дивись `status`.
|
|
78
|
+
|
|
79
|
+
### status
|
|
80
|
+
```bash
|
|
81
|
+
npx openspec status --change <name>
|
|
82
|
+
```
|
|
83
|
+
`[x]/[ ]` по proposal, design, specs, tasks.
|
|
84
|
+
|
|
85
|
+
### show
|
|
86
|
+
```bash
|
|
87
|
+
npx openspec show <name> [--type change|spec] [--json]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Інше
|
|
91
|
+
```bash
|
|
92
|
+
npm run openspec:update
|
|
93
|
+
npx openspec archive <name>
|
|
94
|
+
npx openspec view
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Типовий порядок
|
|
98
|
+
`list` → `status --change <n>` → `validate` → `show <n>`
|
|
99
|
+
|
|
100
|
+
### CLI ↔ Cursor
|
|
101
|
+
- `/opsx:propose` → потім `status`, `validate`
|
|
102
|
+
- `/opsx:apply` → `list` показує оновлені tasks
|
|
103
|
+
- `/opsx:archive` → `npx openspec archive <name>`
|
|
104
|
+
|
|
105
|
+
## Коли OpenSpec потрібен
|
|
106
|
+
|
|
107
|
+
| Так | Ні |
|
|
108
|
+
|-----|-----|
|
|
109
|
+
| Нова фіча | Typo / текст кнопки |
|
|
110
|
+
| Зміна архітектури | Один стиль (1-2 рядки) |
|
|
111
|
+
| Серйозний баг | Прибрати console.log |
|
|
112
|
+
| Нова вимога | Дрібний eslint-fix |
|
|
113
|
+
|
|
114
|
+
**Правило:** якщо не змінюються вимоги системи і влазить у 1-2 рядки — без change.
|
|
115
|
+
|
|
116
|
+
## Шаблон запиту /opsx:propose
|
|
117
|
+
|
|
118
|
+
```text
|
|
119
|
+
/opsx:propose <kebab-name>
|
|
120
|
+
|
|
121
|
+
[Контекст]
|
|
122
|
+
Що зараз: ...
|
|
123
|
+
|
|
124
|
+
[Задача]
|
|
125
|
+
1-3 речення.
|
|
126
|
+
|
|
127
|
+
[Скоуп]
|
|
128
|
+
- файл A
|
|
129
|
+
- файл B
|
|
130
|
+
|
|
131
|
+
[Non-goals]
|
|
132
|
+
- не чіпати X
|
|
133
|
+
|
|
134
|
+
[Acceptance]
|
|
135
|
+
1) ...
|
|
136
|
+
2) `npm run build` clean
|
|
137
|
+
|
|
138
|
+
[API] ← якщо релевантно
|
|
139
|
+
GET /api/v1/...
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Артефакти — хто пише що
|
|
143
|
+
|
|
144
|
+
| Файл | Draft | Уточнюєш | Фіналізує |
|
|
145
|
+
|------|-------|----------|-----------|
|
|
146
|
+
| `proposal.md` | агент | ти | ти |
|
|
147
|
+
| `design.md` | агент | ти + Q&A | ти |
|
|
148
|
+
| `tasks.md` | агент | ти (додаєш T-таски) | `/opsx:apply` |
|
|
149
|
+
| `specs/<domain>/spec.md` | агент (delta) | ти | `/opsx:archive` merge |
|
|
150
|
+
|
|
151
|
+
Редагуєш просто відкривши файл або кажеш агенту: «У change `X` додай у `tasks.md` пункт …».
|
|
152
|
+
|
|
153
|
+
## Delta — формат
|
|
154
|
+
|
|
155
|
+
```markdown
|
|
156
|
+
# Delta for <domain>
|
|
157
|
+
|
|
158
|
+
## ADDED Requirements
|
|
159
|
+
|
|
160
|
+
### Requirement: <назва>
|
|
161
|
+
Система ПОВИННА ...
|
|
162
|
+
|
|
163
|
+
#### Scenario: <ситуація>
|
|
164
|
+
- GIVEN ...
|
|
165
|
+
- WHEN ...
|
|
166
|
+
- THEN ...
|
|
167
|
+
|
|
168
|
+
## MODIFIED Requirements
|
|
169
|
+
### Requirement: <стара назва>
|
|
170
|
+
Нова поведінка.
|
|
171
|
+
|
|
172
|
+
## REMOVED Requirements
|
|
173
|
+
### Requirement: <що видаляємо>
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Один сценарій ≈ один acceptance. Без коду в спеці.
|
|
177
|
+
|
|
178
|
+
## Типові сценарії
|
|
179
|
+
|
|
180
|
+
### Фіча
|
|
181
|
+
`/opsx:propose add-X` → review → `/opsx:apply` → build → merge → `/opsx:archive`
|
|
182
|
+
|
|
183
|
+
### Баг
|
|
184
|
+
`/opsx:propose fix-<symptom>` з proposal про root cause → `/opsx:apply` → smoke → `/opsx:archive`
|
|
185
|
+
|
|
186
|
+
### Не знаю як
|
|
187
|
+
`/opsx:explore` → `/opsx:propose` → далі стандартно
|
|
188
|
+
|
|
189
|
+
### Дрібниця
|
|
190
|
+
Без OpenSpec — просто правиш.
|
|
191
|
+
|
|
192
|
+
### Перерване apply
|
|
193
|
+
`npx openspec status --change <name>` → `/opsx:apply` (продовжує з `[ ]`)
|
|
194
|
+
|
|
195
|
+
## Часті помилки
|
|
196
|
+
|
|
197
|
+
- `/opsx:apply` без рев’ю → читай `tasks.md`
|
|
198
|
+
- 1 change на 10 різнотемних задач → розбий
|
|
199
|
+
- Не робиш `/opsx:archive` → втрачаєш source of truth
|
|
200
|
+
- Правиш `openspec/specs/` напряму → лише через archive
|
|
201
|
+
- Дрібниця через OpenSpec → накладні витрати
|
|
202
|
+
|
|
203
|
+
## Швидка пам’ятка
|
|
204
|
+
|
|
205
|
+
| Хочу | Команда |
|
|
206
|
+
|------|---------|
|
|
207
|
+
| Обговорити | `/opsx:explore` |
|
|
208
|
+
| Почати | `/opsx:propose <kebab>` |
|
|
209
|
+
| Зробити | `/opsx:apply` |
|
|
210
|
+
| Закрити | `/opsx:archive` |
|
|
211
|
+
| Active | `npm run openspec:list` |
|
|
212
|
+
| Валідація | `npm run openspec:validate` |
|
|
213
|
+
| Прогрес | `npx openspec status --change <n>` |
|
|
214
|
+
| Показати | `npx openspec show <n>` |
|
|
215
|
+
|
|
216
|
+
## Установка у новому проєкті
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
npm install -D @fission-ai/openspec@latest
|
|
220
|
+
npx openspec init --tools cursor --force --profile core
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Додай у `package.json`:
|
|
224
|
+
|
|
225
|
+
```json
|
|
226
|
+
"openspec:list": "openspec list",
|
|
227
|
+
"openspec:validate": "openspec validate --all",
|
|
228
|
+
"openspec:update": "openspec update --force"
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Заповни `openspec/config.yaml` контекстом проєкту (стек, мова, правила).
|
|
232
|
+
|
|
233
|
+
## Інтеграція з PR / онбордингом
|
|
234
|
+
|
|
235
|
+
- PR description: лінк на `openspec/changes/<name>/proposal.md`
|
|
236
|
+
- Онбординг: показуєш `openspec/specs/`
|
|
237
|
+
- Документація системи: ростe сама з archived changes
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-propose
|
|
3
|
+
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.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires openspec CLI.
|
|
6
|
+
metadata:
|
|
7
|
+
author: openspec
|
|
8
|
+
version: "1.0"
|
|
9
|
+
generatedBy: "1.4.1"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Propose a new change - create the change and generate all artifacts in one step.
|
|
13
|
+
|
|
14
|
+
I'll create a change with artifacts:
|
|
15
|
+
- proposal.md (what & why)
|
|
16
|
+
- design.md (how)
|
|
17
|
+
- tasks.md (implementation steps)
|
|
18
|
+
|
|
19
|
+
When ready to implement, run /opsx:apply
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
|
|
24
|
+
|
|
25
|
+
**Steps**
|
|
26
|
+
|
|
27
|
+
1. **If no clear input provided, ask what they want to build**
|
|
28
|
+
|
|
29
|
+
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
|
|
30
|
+
> "What change do you want to work on? Describe what you want to build or fix."
|
|
31
|
+
|
|
32
|
+
From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
|
|
33
|
+
|
|
34
|
+
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
35
|
+
|
|
36
|
+
2. **Create the change directory**
|
|
37
|
+
```bash
|
|
38
|
+
openspec new change "<name>"
|
|
39
|
+
```
|
|
40
|
+
This creates a scaffolded change in the planning home resolved by the CLI with `.openspec.yaml`.
|
|
41
|
+
|
|
42
|
+
3. **Get the artifact build order**
|
|
43
|
+
```bash
|
|
44
|
+
openspec status --change "<name>" --json
|
|
45
|
+
```
|
|
46
|
+
Parse the JSON to get:
|
|
47
|
+
- `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
|
|
48
|
+
- `artifacts`: list of all artifacts with their status and dependencies
|
|
49
|
+
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context. Use these instead of assuming repo-local paths.
|
|
50
|
+
|
|
51
|
+
4. **Create artifacts in sequence until apply-ready**
|
|
52
|
+
|
|
53
|
+
Use the **TodoWrite tool** to track progress through the artifacts.
|
|
54
|
+
|
|
55
|
+
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
|
|
56
|
+
|
|
57
|
+
a. **For each artifact that is `ready` (dependencies satisfied)**:
|
|
58
|
+
- Get instructions:
|
|
59
|
+
```bash
|
|
60
|
+
openspec instructions <artifact-id> --change "<name>" --json
|
|
61
|
+
```
|
|
62
|
+
- The instructions JSON includes:
|
|
63
|
+
- `context`: Project background (constraints for you - do NOT include in output)
|
|
64
|
+
- `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
65
|
+
- `template`: The structure to use for your output file
|
|
66
|
+
- `instruction`: Schema-specific guidance for this artifact type
|
|
67
|
+
- `resolvedOutputPath`: Resolved path or pattern to write the artifact
|
|
68
|
+
- `dependencies`: Completed artifacts to read for context
|
|
69
|
+
- Read any completed dependency files for context
|
|
70
|
+
- Create the artifact file using `template` as the structure and write it to `resolvedOutputPath`
|
|
71
|
+
- Apply `context` and `rules` as constraints - but do NOT copy them into the file
|
|
72
|
+
- Show brief progress: "Created <artifact-id>"
|
|
73
|
+
|
|
74
|
+
b. **Continue until all `applyRequires` artifacts are complete**
|
|
75
|
+
- After creating each artifact, re-run `openspec status --change "<name>" --json`
|
|
76
|
+
- Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
|
|
77
|
+
- Stop when all `applyRequires` artifacts are done
|
|
78
|
+
|
|
79
|
+
c. **If an artifact requires user input** (unclear context):
|
|
80
|
+
- Use **AskUserQuestion tool** to clarify
|
|
81
|
+
- Then continue with creation
|
|
82
|
+
|
|
83
|
+
5. **Show final status**
|
|
84
|
+
```bash
|
|
85
|
+
openspec status --change "<name>"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Output**
|
|
89
|
+
|
|
90
|
+
After completing all artifacts, summarize:
|
|
91
|
+
- Change name and location
|
|
92
|
+
- List of artifacts created with brief descriptions
|
|
93
|
+
- What's ready: "All artifacts created! Ready for implementation."
|
|
94
|
+
- Prompt: "Run `/opsx:apply` or ask me to implement to start working on the tasks."
|
|
95
|
+
|
|
96
|
+
**Artifact Creation Guidelines**
|
|
97
|
+
|
|
98
|
+
- Follow the `instruction` field from `openspec instructions` for each artifact type
|
|
99
|
+
- The schema defines what each artifact should contain - follow it
|
|
100
|
+
- Read dependency artifacts for context before creating new ones
|
|
101
|
+
- Use `template` as the structure for your output file - fill in its sections
|
|
102
|
+
- **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
|
|
103
|
+
- Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
|
|
104
|
+
- These guide what you write, but should never appear in the output
|
|
105
|
+
|
|
106
|
+
**Guardrails**
|
|
107
|
+
- Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
|
|
108
|
+
- Always read dependency artifacts before creating a new one
|
|
109
|
+
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
110
|
+
- If a change with that name already exists, ask if user wants to continue it or create a new one
|
|
111
|
+
- Verify each artifact file exists after writing before proceeding to next
|