diff --git a/openspec/specs/cli-init/spec.md b/openspec/specs/cli-init/spec.md index 4ccb0260..10866f39 100644 --- a/openspec/specs/cli-init/spec.md +++ b/openspec/specs/cli-init/spec.md @@ -76,6 +76,12 @@ The command SHALL properly configure selected AI tools with OpenSpec-specific in - **THEN** create or update `CLINE.md` in the project root directory (not inside openspec/) - **AND** populate the managed block with a short stub that points teammates to `@/openspec/AGENTS.md` +#### Scenario: Configuring iFlow CLI + +- **WHEN** iFlow CLI is selected +- **THEN** create or update `IFLOW.md` in the project root directory (not inside openspec/) +- **AND** populate the managed block with a short stub that points teammates to `@/openspec/AGENTS.md` + #### Scenario: Creating new CLAUDE.md - **WHEN** CLAUDE.md does not exist @@ -118,6 +124,12 @@ The command SHALL provide clear, actionable next steps upon successful initializ - **WHEN** initialization completes successfully - **THEN** include prompt: "Please explain the OpenSpec workflow from openspec/AGENTS.md and how I should work with you on this project" +#### Scenario: Displaying restart instruction +- **WHEN** initialization completes successfully and tools were created or refreshed +- **THEN** display a prominent restart instruction before the "Next steps" section +- **AND** inform users that slash commands are loaded at startup +- **AND** instruct users to restart their coding assistant to ensure /openspec commands appear + ### Requirement: Exit Codes The command SHALL use consistent exit codes to indicate different failure modes. @@ -238,6 +250,14 @@ The init command SHALL generate slash command files for supported editors using - **AND** wrap the OpenSpec managed markers (`` / ``) inside the `prompt` value so `openspec update` can safely refresh the body between markers without touching the TOML framing - **AND** ensure the slash-command copy matches the existing proposal/apply/archive templates used by other tools +#### Scenario: Generating slash commands for iFlow CLI +- **WHEN** the user selects iFlow CLI during initialization +- **THEN** create `.iflow/commands/openspec-proposal.md`, `.iflow/commands/openspec-apply.md`, and `.iflow/commands/openspec-archive.md` +- **AND** populate each file from shared templates so command text matches other tools +- **AND** include YAML frontmatter with `name`, `id`, `category`, and `description` fields for each command +- **AND** wrap the generated content in OpenSpec managed markers so `openspec update` can safely refresh the commands +- **AND** each template includes instructions for the relevant OpenSpec workflow stage + #### Scenario: Generating slash commands for RooCode - **WHEN** the user selects RooCode during initialization - **THEN** create `.roo/commands/openspec-proposal.md`, `.roo/commands/openspec-apply.md`, and `.roo/commands/openspec-archive.md` diff --git a/openspec/specs/cli-update/spec.md b/openspec/specs/cli-update/spec.md index bca34f17..d181d7d0 100644 --- a/openspec/specs/cli-update/spec.md +++ b/openspec/specs/cli-update/spec.md @@ -123,6 +123,13 @@ The update command SHALL refresh existing slash command files for configured too - **AND** replace only the content between `` and `` markers inside the `prompt = """` block so the TOML framing (`description`, `prompt`) stays intact - **AND** skip creating any missing `.toml` files during update; only pre-existing Gemini commands are refreshed +#### Scenario: Updating slash commands for iFlow CLI +- **WHEN** `.iflow/commands/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md` +- **THEN** refresh each file using shared templates +- **AND** preserve the YAML frontmatter with `name`, `id`, `category`, and `description` fields +- **AND** update only the OpenSpec-managed block between markers +- **AND** ensure templates include instructions for the relevant workflow stage + #### Scenario: Missing slash command file - **WHEN** a tool lacks a slash command file - **THEN** do not create a new file during update diff --git a/src/core/config.ts b/src/core/config.ts index 20218821..c0c3da9e 100644 --- a/src/core/config.ts +++ b/src/core/config.ts @@ -17,25 +17,25 @@ export interface AIToolOption { } export const AI_TOOLS: AIToolOption[] = [ + { name: 'Amazon Q Developer', value: 'amazon-q', available: true, successLabel: 'Amazon Q Developer' }, + { name: 'Antigravity', value: 'antigravity', available: true, successLabel: 'Antigravity' }, { name: 'Auggie (Augment CLI)', value: 'auggie', available: true, successLabel: 'Auggie' }, { name: 'Claude Code', value: 'claude', available: true, successLabel: 'Claude Code' }, { name: 'Cline', value: 'cline', available: true, successLabel: 'Cline' }, - { name: 'RooCode', value: 'roocode', available: true, successLabel: 'RooCode' }, + { name: 'Codex', value: 'codex', available: true, successLabel: 'Codex' }, { name: 'CodeBuddy Code (CLI)', value: 'codebuddy', available: true, successLabel: 'CodeBuddy Code' }, { name: 'CoStrict', value: 'costrict', available: true, successLabel: 'CoStrict' }, { name: 'Crush', value: 'crush', available: true, successLabel: 'Crush' }, { name: 'Cursor', value: 'cursor', available: true, successLabel: 'Cursor' }, { name: 'Factory Droid', value: 'factory', available: true, successLabel: 'Factory Droid' }, { name: 'Gemini CLI', value: 'gemini', available: true, successLabel: 'Gemini CLI' }, + { name: 'GitHub Copilot', value: 'github-copilot', available: true, successLabel: 'GitHub Copilot' }, { name: 'iFlow', value: 'iflow', available: true, successLabel: 'iFlow' }, - { name: 'OpenCode', value: 'opencode', available: true, successLabel: 'OpenCode' }, { name: 'Kilo Code', value: 'kilocode', available: true, successLabel: 'Kilo Code' }, + { name: 'OpenCode', value: 'opencode', available: true, successLabel: 'OpenCode' }, { name: 'Qoder (CLI)', value: 'qoder', available: true, successLabel: 'Qoder' }, - { name: 'Antigravity', value: 'antigravity', available: true, successLabel: 'Antigravity' }, - { name: 'Windsurf', value: 'windsurf', available: true, successLabel: 'Windsurf' }, - { name: 'Codex', value: 'codex', available: true, successLabel: 'Codex' }, - { name: 'GitHub Copilot', value: 'github-copilot', available: true, successLabel: 'GitHub Copilot' }, - { name: 'Amazon Q Developer', value: 'amazon-q', available: true, successLabel: 'Amazon Q Developer' }, { name: 'Qwen Code', value: 'qwen', available: true, successLabel: 'Qwen Code' }, + { name: 'RooCode', value: 'roocode', available: true, successLabel: 'RooCode' }, + { name: 'Windsurf', value: 'windsurf', available: true, successLabel: 'Windsurf' }, { name: 'AGENTS.md (works with Amp, VS Code, …)', value: 'agents', available: false, successLabel: 'your AGENTS.md-compatible assistant' } ]; diff --git a/src/core/init.ts b/src/core/init.ts index 05e9be42..ebc98c9c 100644 --- a/src/core/init.ts +++ b/src/core/init.ts @@ -862,6 +862,22 @@ export class InitCommand { ) ); + // Show restart instruction if any tools were configured + if (created.length > 0 || refreshed.length > 0) { + console.log(); + console.log(PALETTE.white('Important: Restart your IDE')); + console.log( + PALETTE.midGray( + 'Slash commands are loaded at startup. Please restart your coding assistant' + ) + ); + console.log( + PALETTE.midGray( + 'to ensure the new /openspec commands appear in your command palette.' + ) + ); + } + // Get the selected tool name(s) for display const toolName = this.formatToolNames(selectedTools);