Skip to content

Commit d49a88c

Browse files
authored
feat: add /opsx:explore command for exploratory thinking (Fission-AI#467)
Wire up the explore skill and slash command templates to the artifact-experimental-setup command. This adds /opsx:explore as a thinking partner mode for exploring ideas, investigating problems, and clarifying requirements before committing to a change. Changes: - Add imports for getExploreSkillTemplate and getOpsxExploreCommandTemplate - Add explore skill to skills array (generates openspec-explore/SKILL.md) - Add explore command to commands array (generates opsx/explore.md) - Add /opsx:explore to CLI usage message - Update docs/experimental-workflow.md with explore command
1 parent bb9f6ce commit d49a88c

3 files changed

Lines changed: 498 additions & 21 deletions

File tree

docs/experimental-workflow.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ This creates skills in `.claude/skills/` that Claude Code auto-detects.
8282

8383
| Command | What it does |
8484
|---------|--------------|
85+
| `/opsx:explore` | Think through ideas, investigate problems, clarify requirements |
8586
| `/opsx:new` | Start a new change |
8687
| `/opsx:continue` | Create the next artifact (based on what's ready) |
8788
| `/opsx:ff` | Fast-forward — create all planning artifacts at once |
@@ -91,6 +92,12 @@ This creates skills in `.claude/skills/` that Claude Code auto-detects.
9192

9293
## Usage
9394

95+
### Explore an idea
96+
```
97+
/opsx:explore
98+
```
99+
Think through ideas, investigate problems, compare options. No structure required - just a thinking partner. When insights crystallize, transition to `/opsx:new` or `/opsx:ff`.
100+
94101
### Start a new change
95102
```
96103
/opsx:new
@@ -520,6 +527,7 @@ Run `openspec schemas` to see available schemas.
520527

521528
## Tips
522529

530+
- Use `/opsx:explore` to think through an idea before committing to a change
523531
- `/opsx:ff` when you know what you want, `/opsx:continue` when exploring
524532
- During `/opsx:apply`, if something's wrong — fix the artifact, then continue
525533
- Tasks track progress via checkboxes in `tasks.md`

src/commands/artifact-workflow.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import {
2828
type SchemaInfo,
2929
} from '../core/artifact-graph/index.js';
3030
import { createChange, validateChangeName } from '../utils/change-utils.js';
31-
import { getNewChangeSkillTemplate, getContinueChangeSkillTemplate, getApplyChangeSkillTemplate, getFfChangeSkillTemplate, getSyncSpecsSkillTemplate, getArchiveChangeSkillTemplate, getOpsxNewCommandTemplate, getOpsxContinueCommandTemplate, getOpsxApplyCommandTemplate, getOpsxFfCommandTemplate, getOpsxSyncCommandTemplate, getOpsxArchiveCommandTemplate } from '../core/templates/skill-templates.js';
31+
import { getExploreSkillTemplate, getNewChangeSkillTemplate, getContinueChangeSkillTemplate, getApplyChangeSkillTemplate, getFfChangeSkillTemplate, getSyncSpecsSkillTemplate, getArchiveChangeSkillTemplate, getOpsxExploreCommandTemplate, getOpsxNewCommandTemplate, getOpsxContinueCommandTemplate, getOpsxApplyCommandTemplate, getOpsxFfCommandTemplate, getOpsxSyncCommandTemplate, getOpsxArchiveCommandTemplate } from '../core/templates/skill-templates.js';
3232
import { FileSystemUtils } from '../utils/file-system.js';
3333

3434
// -----------------------------------------------------------------------------
@@ -793,6 +793,7 @@ async function artifactExperimentalSetupCommand(): Promise<void> {
793793
const commandsDir = path.join(projectRoot, '.claude', 'commands', 'opsx');
794794

795795
// Get skill templates
796+
const exploreSkill = getExploreSkillTemplate();
796797
const newChangeSkill = getNewChangeSkillTemplate();
797798
const continueChangeSkill = getContinueChangeSkillTemplate();
798799
const applyChangeSkill = getApplyChangeSkillTemplate();
@@ -801,6 +802,7 @@ async function artifactExperimentalSetupCommand(): Promise<void> {
801802
const archiveChangeSkill = getArchiveChangeSkillTemplate();
802803

803804
// Get command templates
805+
const exploreCommand = getOpsxExploreCommandTemplate();
804806
const newCommand = getOpsxNewCommandTemplate();
805807
const continueCommand = getOpsxContinueCommandTemplate();
806808
const applyCommand = getOpsxApplyCommandTemplate();
@@ -810,6 +812,7 @@ async function artifactExperimentalSetupCommand(): Promise<void> {
810812

811813
// Create skill directories and SKILL.md files
812814
const skills = [
815+
{ template: exploreSkill, dirName: 'openspec-explore' },
813816
{ template: newChangeSkill, dirName: 'openspec-new-change' },
814817
{ template: continueChangeSkill, dirName: 'openspec-continue-change' },
815818
{ template: applyChangeSkill, dirName: 'openspec-apply-change' },
@@ -840,6 +843,7 @@ ${template.instructions}
840843

841844
// Create slash command files
842845
const commands = [
846+
{ template: exploreCommand, fileName: 'explore.md' },
843847
{ template: newCommand, fileName: 'new.md' },
844848
{ template: continueCommand, fileName: 'continue.md' },
845849
{ template: applyCommand, fileName: 'apply.md' },
@@ -898,6 +902,7 @@ ${template.content}
898902
console.log(' • "Implement the tasks for this change"');
899903
console.log();
900904
console.log(' ' + chalk.cyan('Slash Commands') + ' for explicit invocation:');
905+
console.log(' • /opsx:explore - Think through ideas, investigate problems');
901906
console.log(' • /opsx:new - Start a new change');
902907
console.log(' • /opsx:continue - Create the next artifact');
903908
console.log(' • /opsx:apply - Implement tasks');

0 commit comments

Comments
 (0)