visiflow 0.1.0__tar.gz

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 (82) hide show
  1. visiflow-0.1.0/.agent/skills/openspec-apply-change/SKILL.md +160 -0
  2. visiflow-0.1.0/.agent/skills/openspec-archive-change/SKILL.md +118 -0
  3. visiflow-0.1.0/.agent/skills/openspec-explore/SKILL.md +290 -0
  4. visiflow-0.1.0/.agent/skills/openspec-propose/SKILL.md +114 -0
  5. visiflow-0.1.0/.agent/skills/openspec-sync-specs/SKILL.md +148 -0
  6. visiflow-0.1.0/.agent/skills/openspec-update-change/SKILL.md +86 -0
  7. visiflow-0.1.0/.agent/workflows/opsx-apply.md +152 -0
  8. visiflow-0.1.0/.agent/workflows/opsx-archive.md +157 -0
  9. visiflow-0.1.0/.agent/workflows/opsx-explore.md +171 -0
  10. visiflow-0.1.0/.agent/workflows/opsx-propose.md +106 -0
  11. visiflow-0.1.0/.agent/workflows/opsx-sync.md +140 -0
  12. visiflow-0.1.0/.agent/workflows/opsx-update.md +78 -0
  13. visiflow-0.1.0/.gemini/commands/opsx/apply.toml +152 -0
  14. visiflow-0.1.0/.gemini/commands/opsx/archive.toml +157 -0
  15. visiflow-0.1.0/.gemini/commands/opsx/explore.toml +171 -0
  16. visiflow-0.1.0/.gemini/commands/opsx/propose.toml +106 -0
  17. visiflow-0.1.0/.gemini/commands/opsx/sync.toml +140 -0
  18. visiflow-0.1.0/.gemini/commands/opsx/update.toml +78 -0
  19. visiflow-0.1.0/.gemini/skills/openspec-apply-change/SKILL.md +160 -0
  20. visiflow-0.1.0/.gemini/skills/openspec-archive-change/SKILL.md +118 -0
  21. visiflow-0.1.0/.gemini/skills/openspec-explore/SKILL.md +290 -0
  22. visiflow-0.1.0/.gemini/skills/openspec-propose/SKILL.md +114 -0
  23. visiflow-0.1.0/.gemini/skills/openspec-sync-specs/SKILL.md +148 -0
  24. visiflow-0.1.0/.gemini/skills/openspec-update-change/SKILL.md +86 -0
  25. visiflow-0.1.0/.gitattributes +2 -0
  26. visiflow-0.1.0/.opencode/commands/opsx-apply.md +152 -0
  27. visiflow-0.1.0/.opencode/commands/opsx-archive.md +157 -0
  28. visiflow-0.1.0/.opencode/commands/opsx-explore.md +171 -0
  29. visiflow-0.1.0/.opencode/commands/opsx-propose.md +106 -0
  30. visiflow-0.1.0/.opencode/commands/opsx-sync.md +140 -0
  31. visiflow-0.1.0/.opencode/commands/opsx-update.md +78 -0
  32. visiflow-0.1.0/.opencode/skills/openspec-apply-change/SKILL.md +160 -0
  33. visiflow-0.1.0/.opencode/skills/openspec-archive-change/SKILL.md +118 -0
  34. visiflow-0.1.0/.opencode/skills/openspec-explore/SKILL.md +290 -0
  35. visiflow-0.1.0/.opencode/skills/openspec-propose/SKILL.md +114 -0
  36. visiflow-0.1.0/.opencode/skills/openspec-sync-specs/SKILL.md +148 -0
  37. visiflow-0.1.0/.opencode/skills/openspec-update-change/SKILL.md +86 -0
  38. visiflow-0.1.0/PKG-INFO +148 -0
  39. visiflow-0.1.0/README.md +124 -0
  40. visiflow-0.1.0/assets/raw_screenshot.png +0 -0
  41. visiflow-0.1.0/assets/visiflow_demo_banner.png +0 -0
  42. visiflow-0.1.0/bindings/nodejs/example.js +40 -0
  43. visiflow-0.1.0/bindings/nodejs/index.js +89 -0
  44. visiflow-0.1.0/bindings/nodejs/package.json +26 -0
  45. visiflow-0.1.0/openspec/changes/archive/2026-07-25-node-bridge-and-playground/.openspec.yaml +2 -0
  46. visiflow-0.1.0/openspec/changes/archive/2026-07-25-node-bridge-and-playground/README.md +3 -0
  47. visiflow-0.1.0/openspec/changes/archive/2026-07-25-node-bridge-and-playground/design.md +28 -0
  48. visiflow-0.1.0/openspec/changes/archive/2026-07-25-node-bridge-and-playground/proposal.md +25 -0
  49. visiflow-0.1.0/openspec/changes/archive/2026-07-25-node-bridge-and-playground/specs/cli-interface/spec.md +8 -0
  50. visiflow-0.1.0/openspec/changes/archive/2026-07-25-node-bridge-and-playground/specs/http-daemon/spec.md +8 -0
  51. visiflow-0.1.0/openspec/changes/archive/2026-07-25-node-bridge-and-playground/specs/node-bridge/spec.md +8 -0
  52. visiflow-0.1.0/openspec/changes/archive/2026-07-25-node-bridge-and-playground/specs/web-playground/spec.md +8 -0
  53. visiflow-0.1.0/openspec/changes/archive/2026-07-25-node-bridge-and-playground/tasks.md +20 -0
  54. visiflow-0.1.0/openspec/changes/archive/2026-07-25-visiflow-core/.openspec.yaml +2 -0
  55. visiflow-0.1.0/openspec/changes/archive/2026-07-25-visiflow-core/README.md +3 -0
  56. visiflow-0.1.0/openspec/changes/archive/2026-07-25-visiflow-core/design.md +39 -0
  57. visiflow-0.1.0/openspec/changes/archive/2026-07-25-visiflow-core/proposal.md +24 -0
  58. visiflow-0.1.0/openspec/changes/archive/2026-07-25-visiflow-core/specs/element-detection/spec.md +15 -0
  59. visiflow-0.1.0/openspec/changes/archive/2026-07-25-visiflow-core/specs/playwright-integration/spec.md +22 -0
  60. visiflow-0.1.0/openspec/changes/archive/2026-07-25-visiflow-core/specs/selenium-integration/spec.md +15 -0
  61. visiflow-0.1.0/openspec/changes/archive/2026-07-25-visiflow-core/specs/text-anchoring/spec.md +22 -0
  62. visiflow-0.1.0/openspec/changes/archive/2026-07-25-visiflow-core/tasks.md +28 -0
  63. visiflow-0.1.0/openspec/config.yaml +20 -0
  64. visiflow-0.1.0/openspec/specs/cli-interface/spec.md +12 -0
  65. visiflow-0.1.0/openspec/specs/element-detection/spec.md +19 -0
  66. visiflow-0.1.0/openspec/specs/http-daemon/spec.md +12 -0
  67. visiflow-0.1.0/openspec/specs/node-bridge/spec.md +12 -0
  68. visiflow-0.1.0/openspec/specs/playwright-integration/spec.md +26 -0
  69. visiflow-0.1.0/openspec/specs/selenium-integration/spec.md +19 -0
  70. visiflow-0.1.0/openspec/specs/text-anchoring/spec.md +26 -0
  71. visiflow-0.1.0/openspec/specs/web-playground/spec.md +12 -0
  72. visiflow-0.1.0/pyproject.toml +36 -0
  73. visiflow-0.1.0/tests/index.html +158 -0
  74. visiflow-0.1.0/tests/test_visiflow.py +124 -0
  75. visiflow-0.1.0/tools/generate_demo_assets.py +70 -0
  76. visiflow-0.1.0/visiflow/__init__.py +5 -0
  77. visiflow-0.1.0/visiflow/cli.py +56 -0
  78. visiflow-0.1.0/visiflow/core.py +254 -0
  79. visiflow-0.1.0/visiflow/playwright.py +114 -0
  80. visiflow-0.1.0/visiflow/selenium.py +126 -0
  81. visiflow-0.1.0/visiflow/server.py +132 -0
  82. visiflow-0.1.0/visiflow/static/index.html +498 -0
@@ -0,0 +1,160 @@
1
+ ---
2
+ name: openspec-apply-change
3
+ description: Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
4
+ allowed-tools: Bash(openspec:*)
5
+ license: MIT
6
+ compatibility: Requires openspec CLI.
7
+ metadata:
8
+ author: openspec
9
+ version: "1.0"
10
+ generatedBy: "1.6.0"
11
+ ---
12
+
13
+ Implement tasks from an OpenSpec change.
14
+
15
+ **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.
16
+
17
+ **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.
18
+
19
+ **Steps**
20
+
21
+ 1. **Select the change**
22
+
23
+ If a name is provided, use it. Otherwise:
24
+ - Infer from conversation context if the user mentioned a change
25
+ - Auto-select if only one active change exists
26
+ - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
27
+
28
+ Always announce: "Using change: <name>" and how to override (e.g., `/opsx:apply <other>`).
29
+
30
+ 2. **Check status to understand the schema**
31
+ ```bash
32
+ openspec status --change "<name>" --json
33
+ ```
34
+ Parse the JSON to understand:
35
+ - `schemaName`: The workflow being used (e.g., "spec-driven")
36
+ - `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit constraints
37
+ - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
38
+
39
+ 3. **Get apply instructions**
40
+
41
+ ```bash
42
+ openspec instructions apply --change "<name>" --json
43
+ ```
44
+
45
+ This returns:
46
+ - `contextFiles`: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
47
+ - Progress (total, complete, remaining)
48
+ - Task list with status
49
+ - Dynamic instruction based on current state
50
+
51
+ **Handle states:**
52
+ - If `state: "blocked"` (missing artifacts): show message, suggest using openspec-continue-change
53
+ - If `state: "all_done"`: congratulate, suggest archive
54
+ - Otherwise: proceed to implementation
55
+
56
+ 4. **Read context files**
57
+
58
+ Read every file path listed under `contextFiles` from the apply instructions output.
59
+ The files depend on the schema being used:
60
+ - **spec-driven**: proposal, specs, design, tasks
61
+ - Other schemas: follow the contextFiles from CLI output
62
+
63
+ 5. **Show current progress**
64
+
65
+ Display:
66
+ - Schema being used
67
+ - Progress: "N/M tasks complete"
68
+ - Remaining tasks overview
69
+ - Dynamic instruction from CLI
70
+
71
+ 6. **Implement tasks (loop until done or blocked)**
72
+
73
+ For each pending task:
74
+ - Show which task is being worked on
75
+ - Make the code changes required
76
+ - Keep changes minimal and focused
77
+ - Mark task complete in the tasks file: `- [ ]` → `- [x]`
78
+ - Continue to next task
79
+
80
+ **Pause if:**
81
+ - Task is unclear → ask for clarification
82
+ - Implementation reveals a design issue → suggest updating artifacts
83
+ - Error or blocker encountered → report and wait for guidance
84
+ - User interrupts
85
+
86
+ 7. **On completion or pause, show status**
87
+
88
+ Display:
89
+ - Tasks completed this session
90
+ - Overall progress: "N/M tasks complete"
91
+ - If all done: suggest archive
92
+ - If paused: explain why and wait for guidance
93
+
94
+ **Output During Implementation**
95
+
96
+ ```
97
+ ## Implementing: <change-name> (schema: <schema-name>)
98
+
99
+ Working on task 3/7: <task description>
100
+ [...implementation happening...]
101
+ ✓ Task complete
102
+
103
+ Working on task 4/7: <task description>
104
+ [...implementation happening...]
105
+ ✓ Task complete
106
+ ```
107
+
108
+ **Output On Completion**
109
+
110
+ ```
111
+ ## Implementation Complete
112
+
113
+ **Change:** <change-name>
114
+ **Schema:** <schema-name>
115
+ **Progress:** 7/7 tasks complete ✓
116
+
117
+ ### Completed This Session
118
+ - [x] Task 1
119
+ - [x] Task 2
120
+ ...
121
+
122
+ All tasks complete! Ready to archive this change.
123
+ ```
124
+
125
+ **Output On Pause (Issue Encountered)**
126
+
127
+ ```
128
+ ## Implementation Paused
129
+
130
+ **Change:** <change-name>
131
+ **Schema:** <schema-name>
132
+ **Progress:** 4/7 tasks complete
133
+
134
+ ### Issue Encountered
135
+ <description of the issue>
136
+
137
+ **Options:**
138
+ 1. <option 1>
139
+ 2. <option 2>
140
+ 3. Other approach
141
+
142
+ What would you like to do?
143
+ ```
144
+
145
+ **Guardrails**
146
+ - Keep going through tasks until done or blocked
147
+ - Always read context files before starting (from the apply instructions output)
148
+ - If task is ambiguous, pause and ask before implementing
149
+ - If implementation reveals issues, pause and suggest artifact updates
150
+ - Keep code changes minimal and scoped to each task
151
+ - Update task checkbox immediately after completing each task
152
+ - Pause on errors, blockers, or unclear requirements - don't guess
153
+ - Use contextFiles from CLI output, don't assume specific file names
154
+
155
+ **Fluid Workflow Integration**
156
+
157
+ This skill supports the "actions on a change" model:
158
+
159
+ - **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
160
+ - **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: openspec-archive-change
3
+ description: Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
4
+ allowed-tools: Bash(openspec:*)
5
+ license: MIT
6
+ compatibility: Requires openspec CLI.
7
+ metadata:
8
+ author: openspec
9
+ version: "1.0"
10
+ generatedBy: "1.6.0"
11
+ ---
12
+
13
+ Archive a completed change in the experimental workflow.
14
+
15
+ **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.
16
+
17
+ **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.
18
+
19
+ **Steps**
20
+
21
+ 1. **If no change name provided, prompt for selection**
22
+
23
+ Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
24
+
25
+ Show only active changes (not already archived).
26
+ Include the schema used for each change if available.
27
+
28
+ **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
29
+
30
+ 2. **Check artifact completion status**
31
+
32
+ Run `openspec status --change "<name>" --json` to check artifact completion.
33
+
34
+ Parse the JSON to understand:
35
+ - `schemaName`: The workflow being used
36
+ - `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context
37
+ - `artifacts`: List of artifacts with their status (`done` or other)
38
+
39
+ **If any artifacts are not `done`:**
40
+ - Display warning listing incomplete artifacts
41
+ - Use **AskUserQuestion tool** to confirm user wants to proceed
42
+ - Proceed if user confirms
43
+
44
+ 3. **Check task completion status**
45
+
46
+ Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
47
+
48
+ Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
49
+
50
+ **If incomplete tasks found:**
51
+ - Display warning showing count of incomplete tasks
52
+ - Use **AskUserQuestion tool** to confirm user wants to proceed
53
+ - Proceed if user confirms
54
+
55
+ **If no tasks file exists:** Proceed without task-related warning.
56
+
57
+ 4. **Assess delta spec sync state**
58
+
59
+ Use `artifactPaths.specs.existingOutputPaths` from status JSON to check for delta specs. If none exist, proceed without sync prompt.
60
+
61
+ **If delta specs exist:**
62
+ - Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
63
+ - Determine what changes would be applied (adds, modifications, removals, renames)
64
+ - Show a combined summary before prompting
65
+
66
+ **Prompt options:**
67
+ - If changes needed: "Sync now (recommended)", "Archive without syncing"
68
+ - If already synced: "Archive now", "Sync anyway", "Cancel"
69
+
70
+ If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke openspec-sync-specs for change '<name>'. Delta spec analysis: <include the analyzed delta spec summary>"). Proceed to archive regardless of choice.
71
+
72
+ 5. **Perform the archive**
73
+
74
+ Create an `archive` directory under `planningHome.changesDir` if it doesn't exist:
75
+ ```bash
76
+ mkdir -p "<planningHome.changesDir>/archive"
77
+ ```
78
+
79
+ Generate target name using current date: `YYYY-MM-DD-<change-name>`
80
+
81
+ **Check if target already exists:**
82
+ - If yes: Fail with error, suggest renaming existing archive or using different date
83
+ - If no: Move `changeRoot` to the archive directory
84
+
85
+ ```bash
86
+ mv "<changeRoot>" "<planningHome.changesDir>/archive/YYYY-MM-DD-<name>"
87
+ ```
88
+
89
+ 6. **Display summary**
90
+
91
+ Show archive completion summary including:
92
+ - Change name
93
+ - Schema that was used
94
+ - Archive location
95
+ - Whether specs were synced (if applicable)
96
+ - Note about any warnings (incomplete artifacts/tasks)
97
+
98
+ **Output On Success**
99
+
100
+ ```
101
+ ## Archive Complete
102
+
103
+ **Change:** <change-name>
104
+ **Schema:** <schema-name>
105
+ **Archived to:** the archive path derived from `planningHome.changesDir`/YYYY-MM-DD-<name>/
106
+ **Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
107
+
108
+ All artifacts complete. All tasks complete.
109
+ ```
110
+
111
+ **Guardrails**
112
+ - Always prompt for change selection if not provided
113
+ - Use artifact graph (openspec status --json) for completion checking
114
+ - Don't block archive on warnings - just inform and confirm
115
+ - Preserve .openspec.yaml when moving to archive (it moves with the directory)
116
+ - Show clear summary of what happened
117
+ - If sync is requested, use openspec-sync-specs approach (agent-driven)
118
+ - If delta specs exist, always run the sync assessment and show the combined summary before prompting
@@ -0,0 +1,290 @@
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
+ allowed-tools: Bash(openspec:*)
5
+ license: MIT
6
+ compatibility: Requires openspec CLI.
7
+ metadata:
8
+ author: openspec
9
+ version: "1.0"
10
+ generatedBy: "1.6.0"
11
+ ---
12
+
13
+ Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
14
+
15
+ **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.
16
+
17
+ **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.
18
+
19
+ **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.
20
+
21
+ ---
22
+
23
+ ## The Stance
24
+
25
+ - **Curious, not prescriptive** - Ask questions that emerge naturally, don't follow a script
26
+ - **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.
27
+ - **Visual** - Use ASCII diagrams liberally when they'd help clarify thinking
28
+ - **Adaptive** - Follow interesting threads, pivot when new information emerges
29
+ - **Patient** - Don't rush to conclusions, let the shape of the problem emerge
30
+ - **Grounded** - Explore the actual codebase when relevant, don't just theorize
31
+
32
+ ---
33
+
34
+ ## What You Might Do
35
+
36
+ Depending on what the user brings, you might:
37
+
38
+ **Explore the problem space**
39
+ - Ask clarifying questions that emerge from what they said
40
+ - Challenge assumptions
41
+ - Reframe the problem
42
+ - Find analogies
43
+
44
+ **Investigate the codebase**
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
+ - Brainstorm multiple approaches
52
+ - Build comparison tables
53
+ - Sketch tradeoffs
54
+ - Recommend a path (if asked)
55
+
56
+ **Visualize**
57
+ ```
58
+ ┌─────────────────────────────────────────┐
59
+ │ Use ASCII diagrams liberally │
60
+ ├─────────────────────────────────────────┤
61
+ │ │
62
+ │ ┌────────┐ ┌────────┐ │
63
+ │ │ State │────────▶│ State │ │
64
+ │ │ A │ │ B │ │
65
+ │ └────────┘ └────────┘ │
66
+ │ │
67
+ │ System diagrams, state machines, │
68
+ │ data flows, architecture sketches, │
69
+ │ dependency graphs, comparison tables │
70
+ │ │
71
+ └─────────────────────────────────────────┘
72
+ ```
73
+
74
+ **Surface risks and unknowns**
75
+ - Identify what could go wrong
76
+ - Find gaps in understanding
77
+ - Suggest spikes or investigations
78
+
79
+ ---
80
+
81
+ ## OpenSpec Awareness
82
+
83
+ You have full context of the OpenSpec system. Use it naturally, don't force it.
84
+
85
+ ### Check for context
86
+
87
+ At the start, quickly check what exists:
88
+ ```bash
89
+ openspec list --json
90
+ ```
91
+
92
+ This tells you:
93
+ - If there are active changes
94
+ - Their names, schemas, and status
95
+ - What the user might be working on
96
+
97
+ ### When no change exists
98
+
99
+ Think freely. When insights crystallize, you might offer:
100
+
101
+ - "This feels solid enough to start a change. Want me to create a proposal?"
102
+ - Or keep exploring - no pressure to formalize
103
+
104
+ ### When a change exists
105
+
106
+ If the user mentions a change or you detect one is relevant:
107
+
108
+ 1. **Resolve and read existing artifacts for context**
109
+ - Run `openspec status --change "<name>" --json`.
110
+ - Use `changeRoot`, `artifactPaths`, and `actionContext` from the status JSON.
111
+ - Read existing files from `artifactPaths.<artifact>.existingOutputPaths`.
112
+
113
+ 2. **Reference them naturally in conversation**
114
+ - "Your design mentions using Redis, but we just realized SQLite fits better..."
115
+ - "The proposal scopes this to premium users, but we're now thinking everyone..."
116
+
117
+ 3. **Offer to capture when decisions are made**
118
+
119
+ | Insight Type | Where to Capture |
120
+ |----------------------------|--------------------------------|
121
+ | New requirement discovered | `specs/<capability>/spec.md` |
122
+ | Requirement changed | `specs/<capability>/spec.md` |
123
+ | Design decision made | `design.md` |
124
+ | Scope changed | `proposal.md` |
125
+ | New work identified | `tasks.md` |
126
+ | Assumption invalidated | Relevant artifact |
127
+
128
+ Example offers:
129
+ - "That's a design decision. Capture it in design.md?"
130
+ - "This is a new requirement. Add it to specs?"
131
+ - "This changes scope. Update the proposal?"
132
+
133
+ 4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
134
+
135
+ ---
136
+
137
+ ## What You Don't Have To Do
138
+
139
+ - Follow a script
140
+ - Ask the same questions every time
141
+ - Produce a specific artifact
142
+ - Reach a conclusion
143
+ - Stay on topic if a tangent is valuable
144
+ - Be brief (this is thinking time)
145
+
146
+ ---
147
+
148
+ ## Handling Different Entry Points
149
+
150
+ **User brings a vague idea:**
151
+ ```
152
+ User: I'm thinking about adding real-time collaboration
153
+
154
+ You: Real-time collab is a big space. Let me think about this...
155
+
156
+ COLLABORATION SPECTRUM
157
+ ════════════════════════════════════════════
158
+
159
+ Awareness Coordination Sync
160
+ │ │ │
161
+ ▼ ▼ ▼
162
+ ┌────────┐ ┌────────┐ ┌────────┐
163
+ │Presence│ │Cursors │ │ CRDT │
164
+ │ "3 │ │ Multi │ │Conflict│
165
+ │online" │ │ select │ │ free │
166
+ └────────┘ └────────┘ └────────┘
167
+ │ │ │
168
+ trivial moderate complex
169
+
170
+ Where's your head at?
171
+ ```
172
+
173
+ **User brings a specific problem:**
174
+ ```
175
+ User: The auth system is a mess
176
+
177
+ You: [reads codebase]
178
+
179
+ ┌─────────────────────────────────────────────┐
180
+ │ CURRENT AUTH FLOW │
181
+ └─────────────────────────────────────────────┘
182
+
183
+ ┌─────────────┼─────────────┐
184
+ ▼ ▼ ▼
185
+ ┌─────────┐ ┌─────────┐ ┌─────────┐
186
+ │ Google │ │ GitHub │ │ Email │
187
+ │ OAuth │ │ OAuth │ │ Magic │
188
+ └────┬────┘ └────┬────┘ └────┬────┘
189
+ │ │ │
190
+ └─────────────┼─────────────┘
191
+
192
+ ┌───────────┐
193
+ │ Session │
194
+ └─────┬─────┘
195
+
196
+
197
+ ┌───────────┐
198
+ │ Perms │
199
+ └───────────┘
200
+
201
+ I see three tangles. Which one's burning?
202
+ ```
203
+
204
+ **User is stuck mid-implementation:**
205
+ ```
206
+ User: /opsx:explore add-auth-system
207
+ The OAuth integration is more complex than expected
208
+
209
+ You: [reads change artifacts]
210
+
211
+ You're on task 4: "Implement OAuth flow"
212
+
213
+ Let me trace what's involved...
214
+
215
+ [draws diagram, explores options, suggests paths]
216
+
217
+ Want to update the design to reflect this?
218
+ Or add a spike task to investigate?
219
+ ```
220
+
221
+ **User wants to compare options:**
222
+ ```
223
+ User: Should we use Postgres or SQLite?
224
+
225
+ You: Generic answer is boring. What's the context?
226
+
227
+ User: A CLI tool that tracks local dev environments
228
+
229
+ You: That changes everything.
230
+
231
+ ┌─────────────────────────────────────────────────┐
232
+ │ CLI TOOL DATA STORAGE │
233
+ └─────────────────────────────────────────────────┘
234
+
235
+ Key constraints:
236
+ • No daemon running
237
+ • Must work offline
238
+ • Single user
239
+
240
+ SQLite Postgres
241
+ Deployment embedded ✓ needs server ✗
242
+ Offline yes ✓ no ✗
243
+ Single file yes ✓ no ✗
244
+
245
+ SQLite. Not even close.
246
+
247
+ Unless... is there a sync component?
248
+ ```
249
+
250
+ ---
251
+
252
+ ## Ending Discovery
253
+
254
+ There's no required ending. Discovery might:
255
+
256
+ - **Flow into a proposal**: "Ready to start? I can create a change proposal."
257
+ - **Result in artifact updates**: "Updated design.md with these decisions"
258
+ - **Just provide clarity**: User has what they need, moves on
259
+ - **Continue later**: "We can pick this up anytime"
260
+
261
+ When it feels like things are crystallizing, you might summarize:
262
+
263
+ ```
264
+ ## What We Figured Out
265
+
266
+ **The problem**: [crystallized understanding]
267
+
268
+ **The approach**: [if one emerged]
269
+
270
+ **Open questions**: [if any remain]
271
+
272
+ **Next steps** (if ready):
273
+ - Create a change proposal
274
+ - Keep exploring: just keep talking
275
+ ```
276
+
277
+ But this summary is optional. Sometimes the thinking IS the value.
278
+
279
+ ---
280
+
281
+ ## Guardrails
282
+
283
+ - **Don't implement** - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
284
+ - **Don't fake understanding** - If something is unclear, dig deeper
285
+ - **Don't rush** - Discovery is thinking time, not task time
286
+ - **Don't force structure** - Let patterns emerge naturally
287
+ - **Don't auto-capture** - Offer to save insights, don't just do it
288
+ - **Do visualize** - A good diagram is worth many paragraphs
289
+ - **Do explore the codebase** - Ground discussions in reality
290
+ - **Do question assumptions** - Including the user's and your own
@@ -0,0 +1,114 @@
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
+ allowed-tools: Bash(openspec:*)
5
+ license: MIT
6
+ compatibility: Requires openspec CLI.
7
+ metadata:
8
+ author: openspec
9
+ version: "1.0"
10
+ generatedBy: "1.6.0"
11
+ ---
12
+
13
+ Propose a new change - create the change and generate all artifacts in one step.
14
+
15
+ I'll create a change with artifacts:
16
+ - proposal.md (what & why)
17
+ - design.md (how)
18
+ - tasks.md (implementation steps)
19
+
20
+ When ready to implement, run /opsx:apply
21
+
22
+ ---
23
+
24
+ **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.
25
+
26
+ **Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
27
+
28
+ **Steps**
29
+
30
+ 1. **If no clear input provided, ask what they want to build**
31
+
32
+ Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
33
+ > "What change do you want to work on? Describe what you want to build or fix."
34
+
35
+ From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
36
+
37
+ **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
38
+
39
+ 2. **Create the change directory**
40
+ ```bash
41
+ openspec new change "<name>"
42
+ ```
43
+ This creates a scaffolded change in the planning home resolved by the CLI with `.openspec.yaml`.
44
+
45
+ 3. **Get the artifact build order**
46
+ ```bash
47
+ openspec status --change "<name>" --json
48
+ ```
49
+ Parse the JSON to get:
50
+ - `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
51
+ - `artifacts`: list of all artifacts with their status and dependencies
52
+ - `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context. Use these instead of assuming repo-local paths.
53
+
54
+ 4. **Create artifacts in sequence until apply-ready**
55
+
56
+ Use the **TodoWrite tool** to track progress through the artifacts.
57
+
58
+ Loop through artifacts in dependency order (artifacts with no pending dependencies first):
59
+
60
+ a. **For each artifact that is `ready` (dependencies satisfied)**:
61
+ - Get instructions:
62
+ ```bash
63
+ openspec instructions <artifact-id> --change "<name>" --json
64
+ ```
65
+ - The instructions JSON includes:
66
+ - `context`: Project background (constraints for you - do NOT include in output)
67
+ - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
68
+ - `template`: The structure to use for your output file
69
+ - `instruction`: Schema-specific guidance for this artifact type
70
+ - `resolvedOutputPath`: Resolved path or pattern to write the artifact
71
+ - `dependencies`: Completed artifacts to read for context
72
+ - Read any completed dependency files for context
73
+ - Create the artifact file using `template` as the structure and write it to `resolvedOutputPath`
74
+ - Apply `context` and `rules` as constraints - but do NOT copy them into the file
75
+ - Show brief progress: "Created <artifact-id>"
76
+
77
+ b. **Continue until all `applyRequires` artifacts are complete**
78
+ - After creating each artifact, re-run `openspec status --change "<name>" --json`
79
+ - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
80
+ - Stop when all `applyRequires` artifacts are done
81
+
82
+ c. **If an artifact requires user input** (unclear context):
83
+ - Use **AskUserQuestion tool** to clarify
84
+ - Then continue with creation
85
+
86
+ 5. **Show final status**
87
+ ```bash
88
+ openspec status --change "<name>"
89
+ ```
90
+
91
+ **Output**
92
+
93
+ After completing all artifacts, summarize:
94
+ - Change name and location
95
+ - List of artifacts created with brief descriptions
96
+ - What's ready: "All artifacts created! Ready for implementation."
97
+ - Prompt: "Run `/opsx:apply` or ask me to implement to start working on the tasks."
98
+
99
+ **Artifact Creation Guidelines**
100
+
101
+ - Follow the `instruction` field from `openspec instructions` for each artifact type
102
+ - The schema defines what each artifact should contain - follow it
103
+ - Read dependency artifacts for context before creating new ones
104
+ - Use `template` as the structure for your output file - fill in its sections
105
+ - **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
106
+ - Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
107
+ - These guide what you write, but should never appear in the output
108
+
109
+ **Guardrails**
110
+ - Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
111
+ - Always read dependency artifacts before creating a new one
112
+ - If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
113
+ - If a change with that name already exists, ask if user wants to continue it or create a new one
114
+ - Verify each artifact file exists after writing before proceeding to next