6aspec 2.0.0-dev.2 → 2.0.0-dev.20

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 (88) hide show
  1. package/.6aspec/rules/brown/brown_archive_sop.md +8 -8
  2. package/.6aspec/rules/brown/brown_constitution.md +11 -0
  3. package/.6aspec/rules/brown/brown_continue_sop.md +5 -2
  4. package/.6aspec/rules/brown/brown_design_sop.md +168 -28
  5. package/.6aspec/rules/brown/brown_explore_sop.md +314 -0
  6. package/.6aspec/rules/brown/brown_ff_sop.md +31 -18
  7. package/.6aspec/rules/brown/brown_impact_sop.md +105 -36
  8. package/.6aspec/rules/brown/brown_implement_sop.md +3 -3
  9. package/.6aspec/rules/brown/brown_list_sop.md +12 -12
  10. package/.6aspec/rules/brown/brown_new_sop.md +58 -34
  11. package/.6aspec/rules/brown/brown_proposal_sop.md +293 -75
  12. package/.6aspec/rules/brown/brown_quick_sop.md +5 -5
  13. package/.6aspec/rules/brown/brown_review_sop.md +4 -4
  14. package/.6aspec/rules/brown/brown_rollback_sop.md +29 -19
  15. package/.6aspec/rules/brown/brown_specs_sop.md +370 -120
  16. package/.6aspec/rules/brown/brown_status_sop.md +13 -3
  17. package/.6aspec/rules/brown/brown_tasks_sop.md +18 -5
  18. package/.6aspec/rules/brown/brown_understand_sop.md +111 -40
  19. package/.6aspec/rules/brown/brown_verify_sop.md +1 -1
  20. package/.6aspec/rules/green/{6A_archive_sop.md → green_archive_sop.md} +3 -3
  21. package/.6aspec/rules/green/{6A_clarify_sop.md → green_clarify_sop.md} +1 -1
  22. package/.6aspec/rules/green/{6A_code_implementation_sop.md → green_code_implementation_sop.md} +3 -3
  23. package/.6aspec/rules/green/{6A_continue_sop.md → green_continue_sop.md} +3 -3
  24. package/.6aspec/rules/green/green_status_schema.md +4 -4
  25. package/.6aspec/rules/green/{6A_status_sop.md → green_status_sop.md} +3 -3
  26. package/.6aspec/rules/green/{6A_tasks_sop.md → green_tasks_sop.md} +1 -1
  27. package/.claude/commands/6aspec/brown/explore.md +11 -0
  28. package/.claude/commands/6aspec/green/archive.md +1 -1
  29. package/.claude/commands/6aspec/green/clarify.md +2 -2
  30. package/.claude/commands/6aspec/green/continue.md +1 -1
  31. package/.claude/commands/6aspec/green/design.md +2 -2
  32. package/.claude/commands/6aspec/green/{execute-task.md → implement.md} +1 -1
  33. package/.claude/commands/6aspec/green/import-model-table.md +1 -1
  34. package/.claude/commands/6aspec/green/init.md +2 -2
  35. package/.claude/commands/6aspec/green/model.md +2 -2
  36. package/.claude/commands/6aspec/green/new.md +2 -2
  37. package/.claude/commands/6aspec/green/rollback.md +1 -1
  38. package/.claude/commands/6aspec/green/status.md +1 -1
  39. package/.claude/commands/6aspec/green/tasks.md +2 -2
  40. package/.claude/commands/6aspec/green/visual-logic.md +2 -2
  41. package/.claude/commands/opsx/apply.md +152 -0
  42. package/.claude/commands/opsx/archive.md +157 -0
  43. package/.claude/commands/opsx/bulk-archive.md +242 -0
  44. package/.claude/commands/opsx/continue.md +114 -0
  45. package/.claude/commands/opsx/explore.md +174 -0
  46. package/.claude/commands/opsx/ff.md +94 -0
  47. package/.claude/commands/opsx/new.md +69 -0
  48. package/.claude/commands/opsx/onboard.md +525 -0
  49. package/.claude/commands/opsx/sync.md +134 -0
  50. package/.claude/commands/opsx/verify.md +164 -0
  51. package/.claude/settings.local.json +21 -1
  52. package/.cursor/commands/6aspec/brown/explore.md +11 -0
  53. package/.cursor/commands/6aspec/green/archive.md +1 -1
  54. package/.cursor/commands/6aspec/green/clarify.md +2 -2
  55. package/.cursor/commands/6aspec/green/continue.md +1 -1
  56. package/.cursor/commands/6aspec/green/design.md +2 -2
  57. package/.cursor/commands/6aspec/green/{execute-task.md → implement.md} +1 -1
  58. package/.cursor/commands/6aspec/green/import-model-table.md +1 -1
  59. package/.cursor/commands/6aspec/green/init.md +2 -2
  60. package/.cursor/commands/6aspec/green/model.md +2 -2
  61. package/.cursor/commands/6aspec/green/new.md +2 -2
  62. package/.cursor/commands/6aspec/green/rollback.md +1 -1
  63. package/.cursor/commands/6aspec/green/status.md +1 -1
  64. package/.cursor/commands/6aspec/green/tasks.md +2 -2
  65. package/.cursor/commands/6aspec/green/visual-logic.md +2 -2
  66. package/.cursor/commands/opsx-apply.md +152 -0
  67. package/.cursor/commands/opsx-archive.md +157 -0
  68. package/.cursor/commands/opsx-bulk-archive.md +242 -0
  69. package/.cursor/commands/opsx-continue.md +114 -0
  70. package/.cursor/commands/opsx-explore.md +174 -0
  71. package/.cursor/commands/opsx-ff.md +94 -0
  72. package/.cursor/commands/opsx-new.md +69 -0
  73. package/.cursor/commands/opsx-onboard.md +525 -0
  74. package/.cursor/commands/opsx-sync.md +134 -0
  75. package/.cursor/commands/opsx-verify.md +164 -0
  76. package/README.md +1 -1
  77. package/bin/6aspec +17 -1
  78. package/lib/cli.js +178 -45
  79. package/package.json +1 -1
  80. /package/.6aspec/rules/green/{6A_constitution.md → green_constitution.md} +0 -0
  81. /package/.6aspec/rules/green/{6A_design_sop.md → green_design_sop.md} +0 -0
  82. /package/.6aspec/rules/green/{6A_import_model_table_sop.md → green_import_model_table_sop.md} +0 -0
  83. /package/.6aspec/rules/green/{6A_init_event_list_sop.md → green_init_event_list_sop.md} +0 -0
  84. /package/.6aspec/rules/green/{6A_init_map_sop.md → green_init_map_sop.md} +0 -0
  85. /package/.6aspec/rules/green/{6A_model_sop.md → green_model_sop.md} +0 -0
  86. /package/.6aspec/rules/green/{6A_new_sop.md → green_new_sop.md} +0 -0
  87. /package/.6aspec/rules/green/{6A_rollback_sop.md → green_rollback_sop.md} +0 -0
  88. /package/.6aspec/rules/green/{6A_visual_logic_sop.md → green_visual_logic_sop.md} +0 -0
@@ -0,0 +1,174 @@
1
+ ---
2
+ name: "OPSX: Explore"
3
+ description: "Enter explore mode - think through ideas, investigate problems, clarify requirements"
4
+ category: Workflow
5
+ tags: [workflow, explore, experimental, thinking]
6
+ ---
7
+
8
+ Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
9
+
10
+ **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 (e.g., start a change with `/opsx:new` or `/opsx:ff`). You MAY create OpenSpec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing.
11
+
12
+ **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.
13
+
14
+ **Input**: The argument after `/opsx:explore` is whatever the user wants to think about. Could be:
15
+ - A vague idea: "real-time collaboration"
16
+ - A specific problem: "the auth system is getting unwieldy"
17
+ - A change name: "add-dark-mode" (to explore in context of that change)
18
+ - A comparison: "postgres vs sqlite for this"
19
+ - Nothing (just enter explore mode)
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
+ If the user mentioned a specific change name, read its artifacts for context.
98
+
99
+ ### When no change exists
100
+
101
+ Think freely. When insights crystallize, you might offer:
102
+
103
+ - "This feels solid enough to start a change. Want me to create one?"
104
+ → Can transition to `/opsx:new` or `/opsx:ff`
105
+ - Or keep exploring - no pressure to formalize
106
+
107
+ ### When a change exists
108
+
109
+ If the user mentions a change or you detect one is relevant:
110
+
111
+ 1. **Read existing artifacts for context**
112
+ - `openspec/changes/<name>/proposal.md`
113
+ - `openspec/changes/<name>/design.md`
114
+ - `openspec/changes/<name>/tasks.md`
115
+ - etc.
116
+
117
+ 2. **Reference them naturally in conversation**
118
+ - "Your design mentions using Redis, but we just realized SQLite fits better..."
119
+ - "The proposal scopes this to premium users, but we're now thinking everyone..."
120
+
121
+ 3. **Offer to capture when decisions are made**
122
+
123
+ | Insight Type | Where to Capture |
124
+ |--------------|------------------|
125
+ | New requirement discovered | `specs/<capability>/spec.md` |
126
+ | Requirement changed | `specs/<capability>/spec.md` |
127
+ | Design decision made | `design.md` |
128
+ | Scope changed | `proposal.md` |
129
+ | New work identified | `tasks.md` |
130
+ | Assumption invalidated | Relevant artifact |
131
+
132
+ Example offers:
133
+ - "That's a design decision. Capture it in design.md?"
134
+ - "This is a new requirement. Add it to specs?"
135
+ - "This changes scope. Update the proposal?"
136
+
137
+ 4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
138
+
139
+ ---
140
+
141
+ ## What You Don't Have To Do
142
+
143
+ - Follow a script
144
+ - Ask the same questions every time
145
+ - Produce a specific artifact
146
+ - Reach a conclusion
147
+ - Stay on topic if a tangent is valuable
148
+ - Be brief (this is thinking time)
149
+
150
+ ---
151
+
152
+ ## Ending Discovery
153
+
154
+ There's no required ending. Discovery might:
155
+
156
+ - **Flow into action**: "Ready to start? `/opsx:new` or `/opsx:ff`"
157
+ - **Result in artifact updates**: "Updated design.md with these decisions"
158
+ - **Just provide clarity**: User has what they need, moves on
159
+ - **Continue later**: "We can pick this up anytime"
160
+
161
+ When things crystallize, you might offer a summary - but it's optional. Sometimes the thinking IS the value.
162
+
163
+ ---
164
+
165
+ ## Guardrails
166
+
167
+ - **Don't implement** - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
168
+ - **Don't fake understanding** - If something is unclear, dig deeper
169
+ - **Don't rush** - Discovery is thinking time, not task time
170
+ - **Don't force structure** - Let patterns emerge naturally
171
+ - **Don't auto-capture** - Offer to save insights, don't just do it
172
+ - **Do visualize** - A good diagram is worth many paragraphs
173
+ - **Do explore the codebase** - Ground discussions in reality
174
+ - **Do question assumptions** - Including the user's and your own
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: "OPSX: Fast Forward"
3
+ description: Create a change and generate all artifacts needed for implementation in one go
4
+ category: Workflow
5
+ tags: [workflow, artifacts, experimental]
6
+ ---
7
+
8
+ Fast-forward through artifact creation - generate everything needed to start implementation.
9
+
10
+ **Input**: The argument after `/opsx:ff` is the change name (kebab-case), OR a description of what the user wants to build.
11
+
12
+ **Steps**
13
+
14
+ 1. **If no input provided, ask what they want to build**
15
+
16
+ Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
17
+ > "What change do you want to work on? Describe what you want to build or fix."
18
+
19
+ From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
20
+
21
+ **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
22
+
23
+ 2. **Create the change directory**
24
+ ```bash
25
+ openspec new change "<name>"
26
+ ```
27
+ This creates a scaffolded change at `openspec/changes/<name>/`.
28
+
29
+ 3. **Get the artifact build order**
30
+ ```bash
31
+ openspec status --change "<name>" --json
32
+ ```
33
+ Parse the JSON to get:
34
+ - `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
35
+ - `artifacts`: list of all artifacts with their status and dependencies
36
+
37
+ 4. **Create artifacts in sequence until apply-ready**
38
+
39
+ Use the **TodoWrite tool** to track progress through the artifacts.
40
+
41
+ Loop through artifacts in dependency order (artifacts with no pending dependencies first):
42
+
43
+ a. **For each artifact that is `ready` (dependencies satisfied)**:
44
+ - Get instructions:
45
+ ```bash
46
+ openspec instructions <artifact-id> --change "<name>" --json
47
+ ```
48
+ - The instructions JSON includes:
49
+ - `context`: Project background (constraints for you - do NOT include in output)
50
+ - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
51
+ - `template`: The structure to use for your output file
52
+ - `instruction`: Schema-specific guidance for this artifact type
53
+ - `outputPath`: Where to write the artifact
54
+ - `dependencies`: Completed artifacts to read for context
55
+ - Read any completed dependency files for context
56
+ - Create the artifact file using `template` as the structure
57
+ - Apply `context` and `rules` as constraints - but do NOT copy them into the file
58
+ - Show brief progress: "✓ Created <artifact-id>"
59
+
60
+ b. **Continue until all `applyRequires` artifacts are complete**
61
+ - After creating each artifact, re-run `openspec status --change "<name>" --json`
62
+ - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
63
+ - Stop when all `applyRequires` artifacts are done
64
+
65
+ c. **If an artifact requires user input** (unclear context):
66
+ - Use **AskUserQuestion tool** to clarify
67
+ - Then continue with creation
68
+
69
+ 5. **Show final status**
70
+ ```bash
71
+ openspec status --change "<name>"
72
+ ```
73
+
74
+ **Output**
75
+
76
+ After completing all artifacts, summarize:
77
+ - Change name and location
78
+ - List of artifacts created with brief descriptions
79
+ - What's ready: "All artifacts created! Ready for implementation."
80
+ - Prompt: "Run `/opsx:apply` to start implementing."
81
+
82
+ **Artifact Creation Guidelines**
83
+
84
+ - Follow the `instruction` field from `openspec instructions` for each artifact type
85
+ - The schema defines what each artifact should contain - follow it
86
+ - Read dependency artifacts for context before creating new ones
87
+ - Use the `template` as a starting point, filling in based on context
88
+
89
+ **Guardrails**
90
+ - Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
91
+ - Always read dependency artifacts before creating a new one
92
+ - If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
93
+ - If a change with that name already exists, ask if user wants to continue it or create a new one
94
+ - Verify each artifact file exists after writing before proceeding to next
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: "OPSX: New"
3
+ description: Start a new change using the experimental artifact workflow (OPSX)
4
+ category: Workflow
5
+ tags: [workflow, artifacts, experimental]
6
+ ---
7
+
8
+ Start a new change using the experimental artifact-driven approach.
9
+
10
+ **Input**: The argument after `/opsx:new` is the change name (kebab-case), OR a description of what the user wants to build.
11
+
12
+ **Steps**
13
+
14
+ 1. **If no input provided, ask what they want to build**
15
+
16
+ Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
17
+ > "What change do you want to work on? Describe what you want to build or fix."
18
+
19
+ From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
20
+
21
+ **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
22
+
23
+ 2. **Determine the workflow schema**
24
+
25
+ Use the default schema (omit `--schema`) unless the user explicitly requests a different workflow.
26
+
27
+ **Use a different schema only if the user mentions:**
28
+ - A specific schema name → use `--schema <name>`
29
+ - "show workflows" or "what workflows" → run `openspec schemas --json` and let them choose
30
+
31
+ **Otherwise**: Omit `--schema` to use the default.
32
+
33
+ 3. **Create the change directory**
34
+ ```bash
35
+ openspec new change "<name>"
36
+ ```
37
+ Add `--schema <name>` only if the user requested a specific workflow.
38
+ This creates a scaffolded change at `openspec/changes/<name>/` with the selected schema.
39
+
40
+ 4. **Show the artifact status**
41
+ ```bash
42
+ openspec status --change "<name>"
43
+ ```
44
+ This shows which artifacts need to be created and which are ready (dependencies satisfied).
45
+
46
+ 5. **Get instructions for the first artifact**
47
+ The first artifact depends on the schema. Check the status output to find the first artifact with status "ready".
48
+ ```bash
49
+ openspec instructions <first-artifact-id> --change "<name>"
50
+ ```
51
+ This outputs the template and context for creating the first artifact.
52
+
53
+ 6. **STOP and wait for user direction**
54
+
55
+ **Output**
56
+
57
+ After completing the steps, summarize:
58
+ - Change name and location
59
+ - Schema/workflow being used and its artifact sequence
60
+ - Current status (0/N artifacts complete)
61
+ - The template for the first artifact
62
+ - Prompt: "Ready to create the first artifact? Run `/opsx:continue` or just describe what this change is about and I'll draft it."
63
+
64
+ **Guardrails**
65
+ - Do NOT create any artifacts yet - just show the instructions
66
+ - Do NOT advance beyond showing the first artifact template
67
+ - If the name is invalid (not kebab-case), ask for a valid name
68
+ - If a change with that name already exists, suggest using `/opsx:continue` instead
69
+ - Pass --schema if using a non-default workflow