-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Add deepseek tui init support #1066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
banqii
wants to merge
2
commits into
Fission-AI:main
Choose a base branch
from
banqii:add-deepseek-tui-init-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -159,3 +159,6 @@ opencode.json | |
|
|
||
| # Bob | ||
| .bob/ | ||
|
|
||
| # Cursor | ||
| .cursor/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
openspec/changes/add-deepseek-tui-init-support/.openspec.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| schema: spec-driven | ||
| created: 2026-05-07 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| ## Context | ||
|
|
||
| `openspec init` already supports multiple AI tools via a shared tool registry and adapter-driven generation pipeline, but DeepSeek TUI is currently missing from the supported tool set. This creates an onboarding gap for users who rely on DeepSeek TUI in this fork. | ||
|
|
||
| The existing init flow already handles a key split in behavior: | ||
| - Skills can be generated for any tool that defines a tool workspace directory. | ||
| - Slash commands are generated only when a command adapter is registered for that tool. | ||
|
|
||
| The change should preserve this architecture and extend it with DeepSeek TUI in a cross-platform-safe way, following the same metadata-first pattern used by `.claude`, `.cursor`, and other tool entries. | ||
|
|
||
| ## Goals / Non-Goals | ||
|
|
||
| **Goals:** | ||
| - Add DeepSeek TUI as a supported tool in `openspec init` for interactive and `--tools` workflows. | ||
| - Ensure DeepSeek TUI participates in tool validation, selection, generation, and summary output. | ||
| - Define DeepSeek path metadata using the existing `skillsDir` convention (`.deepseek`) so generation resolves to `<projectRoot>/.deepseek/skills/`. | ||
| - Preserve adapter-gated command generation semantics (skills can be generated without command adapter). | ||
| - Keep behavior consistent across macOS, Linux, and Windows. | ||
|
|
||
| **Non-Goals:** | ||
| - Introducing new workflow templates beyond existing profile/delivery behavior. | ||
| - Designing a brand-new command adapter framework. | ||
| - Changing existing supported-tool behavior for other tools. | ||
|
|
||
| ## Decisions | ||
|
|
||
| 1. **Register DeepSeek TUI in the canonical supported-tools list and path metadata** | ||
| - DeepSeek TUI is added in `AI_TOOLS` with explicit `value`, display name, and `skillsDir: '.deepseek'`. | ||
| - This keeps behavior aligned with existing tools (e.g. `claude -> .claude`, `cursor -> .cursor`) and avoids bespoke path logic. | ||
| - Rationale: A single source of truth keeps interactive choices, `--tools` validation, and generation routing consistent. | ||
| - Alternative considered: ad-hoc special-casing DeepSeek in init parsing. Rejected because it fragments tool metadata and is brittle. | ||
|
|
||
| 2. **Treat DeepSeek TUI as skills-capable and command-adapter optional** | ||
| - Define a `skillsDir` for DeepSeek TUI and allow skill generation through existing template flow. | ||
| - If no command adapter exists, skip command generation and report it in summary output exactly like other adapterless tools. | ||
| - Rationale: Reuses proven behavior (already present for tools such as Kimi CLI) and avoids blocking init on adapter parity. | ||
| - Alternative considered: requiring command adapter before enabling the tool. Rejected because it delays usable support. | ||
|
|
||
| 3. **Keep output, docs, and validation user-facing and explicit** | ||
| - `--tools` errors and success summaries should recognize DeepSeek TUI as a first-class tool. | ||
| - Tool documentation and CLI docs should list the same tool id/value used in `AI_TOOLS`, avoiding drift between UX and implementation. | ||
| - Rationale: discoverability and predictable CLI UX matter as much as generation mechanics. | ||
| - Alternative considered: silently accept alias values without surfacing tool name. Rejected due to lower transparency. | ||
|
|
||
| 4. **Follow existing integration archetypes (Codex/Cursor/OpenCode/Pi/Kimi)** | ||
| - DeepSeek metadata should mirror the same `AI_TOOLS` shape as Codex/Cursor (`name`, `value`, `successLabel`, `skillsDir`) with no one-off fields unless required. | ||
| - DeepSeek command behavior should follow the same adapter contract as all tools: only generate commands when a registered adapter exists. | ||
| - DeepSeek should not reuse special command-body transforms that are tool-specific to OpenCode/Pi (hyphen rewriting or `$@` injection), unless DeepSeek later introduces equivalent requirements. | ||
| - Rationale: keeps integration maintenance predictable and avoids accidental coupling to unrelated tool quirks. | ||
|
|
||
| ## Risks / Trade-offs | ||
|
|
||
| - **[Risk] Tool ID or directory naming mismatch** -> **Mitigation:** use explicit constants and existing tool metadata patterns, plus tests that assert generated paths and summaries. | ||
| - **[Risk] Adapterless command generation accidentally attempted** -> **Mitigation:** keep generation branch on explicit adapter lookup and verify skip-summary output for DeepSeek TUI. | ||
| - **[Trade-off] DeepSeek may launch with skills-only behavior first** -> **Mitigation:** document and spec this behavior now; adapter can be added later without breaking existing init contract. |
30 changes: 30 additions & 0 deletions
30
openspec/changes/add-deepseek-tui-init-support/proposal.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| ## Why | ||
|
|
||
| OpenSpec `init` currently does not support DeepSeek TUI, which prevents teams using DeepSeek-first workflows from onboarding with the same one-command setup as other tools. Adding native DeepSeek TUI support now removes manual setup friction and keeps tool support parity in this fork. | ||
|
|
||
| ## What Changes | ||
|
|
||
| - Add DeepSeek TUI as a supported AI tool option in `openspec init` interactive and non-interactive flows. | ||
| - Add DeepSeek tool metadata in `AI_TOOLS` using the same directory convention as `.claude`/`.cursor` style tools (`skillsDir` + shared generation flow). | ||
| - Generate DeepSeek skill files under the tool-specific directory during initialization (targeting `<projectRoot>/.deepseek/skills/`). | ||
| - Keep command generation behavior consistent with adapter availability (skip slash command generation if no command adapter exists). | ||
| - Include DeepSeek TUI in validation/error messaging for `--tools` so users can discover and select it reliably. | ||
| - Reflect DeepSeek TUI in init completion summaries (created/refreshed/skipped) when selected. | ||
| - Update tool-facing docs so supported tool IDs and usage guidance stay consistent with existing tools. | ||
|
|
||
| ## Capabilities | ||
|
|
||
| ### New Capabilities | ||
| - None. | ||
|
|
||
| ### Modified Capabilities | ||
| - `cli-init`: Extend tool selection and initialization behavior to include DeepSeek TUI as a first-class supported tool. | ||
| - `ai-tool-paths`: Define DeepSeek TUI path metadata and expected skills output directory convention. | ||
|
|
||
| ## Impact | ||
|
|
||
| - Affected specs: `openspec/specs/cli-init/spec.md`, `openspec/specs/ai-tool-paths/spec.md` (requirement deltas). | ||
| - Affected CLI init flow: supported-tool registry, `--tools` parsing/validation, init summary output, and generation pipeline wiring. | ||
| - Affected metadata: `src/core/config.ts` tool entry for DeepSeek TUI. | ||
| - Affected docs: supported tools list and CLI `--tools` references. | ||
| - Affected generated project files: DeepSeek skill files under `.<tool>/skills/` convention (`.deepseek/skills/` for this tool). |
32 changes: 32 additions & 0 deletions
32
openspec/changes/add-deepseek-tui-init-support/specs/ai-tool-paths/spec.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # ai-tool-paths Delta Specification | ||
|
|
||
| ## MODIFIED Requirements | ||
|
|
||
| ### Requirement: Path configuration for supported tools | ||
|
|
||
| The `AI_TOOLS` array SHALL include `skillsDir` for tools that support the Agent Skills specification. | ||
|
|
||
| #### Scenario: Claude Code paths defined | ||
|
|
||
| - **WHEN** looking up the `claude` tool | ||
| - **THEN** `skillsDir` SHALL be `.claude` | ||
|
|
||
| #### Scenario: Cursor paths defined | ||
|
|
||
| - **WHEN** looking up the `cursor` tool | ||
| - **THEN** `skillsDir` SHALL be `.cursor` | ||
|
|
||
| #### Scenario: Windsurf paths defined | ||
|
|
||
| - **WHEN** looking up the `windsurf` tool | ||
| - **THEN** `skillsDir` SHALL be `.windsurf` | ||
|
|
||
| #### Scenario: Kimi CLI paths defined | ||
|
|
||
| - **WHEN** looking up the `kimi` tool | ||
| - **THEN** `skillsDir` SHALL be `.kimi` | ||
|
|
||
| #### Scenario: DeepSeek TUI paths defined | ||
|
|
||
| - **WHEN** looking up the `deepseek` tool | ||
| - **THEN** `skillsDir` SHALL be `.deepseek` |
51 changes: 51 additions & 0 deletions
51
openspec/changes/add-deepseek-tui-init-support/specs/cli-init/spec.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # cli-init Delta Specification | ||
|
|
||
| ## MODIFIED Requirements | ||
|
|
||
| ### Requirement: Slash Command Generation | ||
|
|
||
| The command SHALL generate opsx slash commands only for selected tools that have a registered command adapter, while keeping adapterless tools valid for skill generation. | ||
|
|
||
| #### Scenario: Generating slash commands for a tool with a registered adapter | ||
|
|
||
| - **WHEN** a tool with a registered command adapter is selected during initialization | ||
| - **THEN** create 9 slash command files using the tool's command adapter: | ||
| - `/opsx:explore` | ||
| - `/opsx:new` | ||
| - `/opsx:continue` | ||
| - `/opsx:apply` | ||
| - `/opsx:ff` | ||
| - `/opsx:verify` | ||
| - `/opsx:sync` | ||
| - `/opsx:archive` | ||
| - `/opsx:bulk-archive` | ||
| - **AND** use tool-specific path conventions (e.g., `.claude/commands/opsx/` for Claude) | ||
| - **AND** include tool-specific frontmatter format | ||
|
|
||
| #### Scenario: Selected tool has no command adapter | ||
|
|
||
| - **GIVEN** a selected tool has `skillsDir` configured but no registered command adapter | ||
| - **WHEN** initialization includes command generation | ||
| - **THEN** skill generation for that tool SHALL still remain valid | ||
| - **AND** command-file generation SHALL be skipped for that tool | ||
| - **AND** the command output SHALL include `Commands skipped for: <tool-id> (no adapter)` | ||
|
|
||
| #### Scenario: Kimi CLI skips command-file generation | ||
|
|
||
| - **WHEN** the user selects Kimi CLI during initialization | ||
| - **THEN** OpenSpec SHALL treat it as a supported tool with `skillsDir: '.kimi'` | ||
| - **AND** command-file generation SHALL be skipped because no Kimi adapter is registered | ||
|
|
||
| #### Scenario: DeepSeek TUI skips command-file generation | ||
|
|
||
| - **WHEN** the user selects DeepSeek TUI during initialization | ||
| - **THEN** OpenSpec SHALL treat it as a supported tool with `skillsDir: '.deepseek'` | ||
| - **AND** skill files SHALL be generated under `<projectRoot>/.deepseek/skills/` when delivery includes skills | ||
| - **AND** command-file generation SHALL be skipped when no DeepSeek adapter is registered | ||
| - **AND** summary output SHALL report `Commands skipped for: deepseek (no adapter)` when command generation is requested | ||
|
|
||
| #### Scenario: DeepSeek appears in non-interactive tool validation | ||
|
|
||
| - **WHEN** the user runs `openspec init --tools deepseek` | ||
| - **THEN** OpenSpec SHALL accept `deepseek` as a valid tool id | ||
| - **AND** it SHALL process DeepSeek using the same validation pipeline as other supported tool ids |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| ## 1. Extend supported tool metadata | ||
|
|
||
| - [x] 1.1 Add DeepSeek TUI to `src/core/config.ts` `AI_TOOLS` using the same metadata shape as tools like `claude` (`value`, `name`, `successLabel`, `skillsDir`), with `value: 'deepseek'` and `skillsDir: '.deepseek'`. | ||
| - [x] 1.2 Ensure DeepSeek TUI is included in interactive tool lists and `--tools` validation/available-values messaging. | ||
|
|
||
| ## 2. Wire generation and init summaries | ||
|
|
||
| - [x] 2.1 Integrate DeepSeek TUI into skill generation routing so init writes workflow files to `<projectRoot>/.deepseek/skills/` using existing templates/profile rules. | ||
| - [x] 2.2 Preserve adapter-gated command generation: when DeepSeek has no command adapter, skip command files and include DeepSeek in the "commands skipped" summary. | ||
| - [x] 2.3 Ensure init success output classifies DeepSeek correctly in created/refreshed/skipped tool summaries. | ||
| - [x] 2.4 Update documentation (`docs/supported-tools.md` and `docs/cli.md`) so DeepSeek appears in supported tool IDs and usage guidance consistently with other tools. | ||
| - [x] 2.5 Confirm DeepSeek integration does not apply tool-specific command-body transforms used by other adapters (e.g., OpenCode/Pi), unless explicitly required by DeepSeek CLI behavior. | ||
|
|
||
| ## 3. Verify behavior with automated tests | ||
|
|
||
| - [x] 3.1 Add/extend init tests for interactive and non-interactive selection to confirm DeepSeek is accepted and processed as a supported tool. | ||
| - [x] 3.2 Add/extend tests validating `.deepseek/skills` output paths and adapterless command-skip behavior/summary output when DeepSeek is selected. | ||
| - [x] 3.3 Add or update cross-platform-safe path assertions (using `path.join`/`path.resolve`) and run the relevant Windows CI-targeted test coverage for changed init paths. | ||
| - [x] 3.4 Add a small parity test matrix (or table-driven case) comparing DeepSeek against representative existing tools: one adapter-backed tool (`codex` or `cursor`) and one adapterless tool (`kimi` or `trae`), to lock in consistent init semantics. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add explicit
saveGlobalConfigto make the parity test's delivery assumption concrete.The standalone DeepSeek (line 195) and Kimi (line 171) adapterless tests both call
saveGlobalConfig({ delivery: 'both' })beforeinitCommand.execute, establishing the scenario where command generation is attempted but skipped due to no adapter. Theit.eachparity test omits this setup, so the cursorhasCommands: trueassertion silently relies on whatever default config the fresh temp dir produces. If the default delivery mode is ever'skills', cursor won't emit command files and the assertion fails; conversely, the kimi/deepseekhasCommands: falseassertions would pass vacuously for the wrong reason (delivery gating rather than adapter absence).🛡️ Proposed fix
)( 'should keep init parity semantics for $tool', async ({ tool, skillsDir, commandPath, hasCommands }) => { + saveGlobalConfig({ + featureFlags: {}, + profile: 'core', + delivery: 'both', + }); const initCommand = new InitCommand({ tools: tool, force: true }); await initCommand.execute(testDir);🤖 Prompt for AI Agents