diff --git a/docs/cli/plan-mode.md b/docs/cli/plan-mode.md index fddaf9d780..60f90b9e50 100644 --- a/docs/cli/plan-mode.md +++ b/docs/cli/plan-mode.md @@ -374,7 +374,7 @@ features and complex tasks through persistent artifacts. It organizes work into tracks and stores them in your project's `.gemini/specs/` directory. SDD leverages Plan Mode internally to ensure architectural safety during the -design phase. To get started with SDD, run `/spec setup`. +design phase. To get started with SDD, run `/spec:setup`. - **Automate transitions:** Switches to read-only mode via [`enter_plan_mode`](../tools/planning.md#1-enter_plan_mode-enterplanmode). diff --git a/docs/cli/settings.md b/docs/cli/settings.md index eb9ba4158e..e23c5dd517 100644 --- a/docs/cli/settings.md +++ b/docs/cli/settings.md @@ -144,15 +144,16 @@ they appear in the UI. ### Experimental -| UI Label | Setting | Description | Default | -| -------------------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| Enable Tool Output Masking | `experimental.toolOutputMasking.enabled` | Enables tool output masking to save tokens. | `true` | -| Use OSC 52 Paste | `experimental.useOSC52Paste` | Use OSC 52 for pasting. This may be more robust than the default system when using remote terminal sessions (if your terminal is configured to allow it). | `false` | -| Use OSC 52 Copy | `experimental.useOSC52Copy` | Use OSC 52 for copying. This may be more robust than the default system when using remote terminal sessions (if your terminal is configured to allow it). | `false` | -| Plan | `experimental.plan` | Enable Plan Mode. | `true` | -| Model Steering | `experimental.modelSteering` | Enable model steering (user hints) to guide the model during tool execution. | `false` | -| Direct Web Fetch | `experimental.directWebFetch` | Enable web fetch behavior that bypasses LLM summarization. | `false` | -| Topic & Update Narration | `experimental.topicUpdateNarration` | Enable the experimental Topic & Update communication model for reduced chattiness and structured progress reporting. | `false` | +| UI Label | Setting | Description | Default | +| ----------------------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| Enable Tool Output Masking | `experimental.toolOutputMasking.enabled` | Enables tool output masking to save tokens. | `true` | +| Use OSC 52 Paste | `experimental.useOSC52Paste` | Use OSC 52 for pasting. This may be more robust than the default system when using remote terminal sessions (if your terminal is configured to allow it). | `false` | +| Use OSC 52 Copy | `experimental.useOSC52Copy` | Use OSC 52 for copying. This may be more robust than the default system when using remote terminal sessions (if your terminal is configured to allow it). | `false` | +| Plan | `experimental.plan` | Enable Plan Mode. | `true` | +| Spec-Driven Development (SDD) | `experimental.sdd` | Enable built-in Spec-Driven Development (SDD) workflow. | `false` | +| Model Steering | `experimental.modelSteering` | Enable model steering (user hints) to guide the model during tool execution. | `false` | +| Direct Web Fetch | `experimental.directWebFetch` | Enable web fetch behavior that bypasses LLM summarization. | `false` | +| Topic & Update Narration | `experimental.topicUpdateNarration` | Enable the experimental Topic & Update communication model for reduced chattiness and structured progress reporting. | `false` | ### Skills diff --git a/docs/cli/spec-driven-development.md b/docs/cli/spec-driven-development.md index 011458d12e..52f17591c4 100644 --- a/docs/cli/spec-driven-development.md +++ b/docs/cli/spec-driven-development.md @@ -65,7 +65,7 @@ consumption in the current session by running `/stats model`. ### 1. Set Up the Project (Run Once) -When you run `/spec setup`, SDD helps you define the core components of your +When you run `/spec:setup`, SDD helps you define the core components of your project context. This context is then used for building new components or features by you or anyone on your team. @@ -87,12 +87,12 @@ features by you or anyone on your team. - `.gemini/specs/tracks.md` ```bash -/spec setup +/spec:setup ``` ### 2. Start a New Track (Feature or Bug) -When you’re ready to take on a new feature or bug fix, run `/spec create`. This +When you’re ready to take on a new feature or bug fix, run `/spec:create`. This initializes a **track** — a high-level unit of work. SDD helps you generate two critical artifacts: @@ -107,14 +107,14 @@ critical artifacts: - `.gemini/specs/tracks//metadata.json` ```bash -/spec create +/spec:create # OR with a description -/spec create "Add a dark mode toggle to the settings page" +/spec:create "Add a dark mode toggle to the settings page" ``` ### 3. Implement the Track -Once you approve the plan, run `/spec implement`. Your coding agent then works +Once you approve the plan, run `/spec:implement`. Your coding agent then works through the `plan.md` file, checking off tasks as it completes them. **Updated Artifacts:** @@ -124,7 +124,7 @@ through the `plan.md` file, checking off tasks as it completes them. - Project context files (Synchronized on completion) ```bash -/spec implement +/spec:implement ``` SDD will: @@ -140,28 +140,28 @@ During implementation, you can also: - **Check status**: Get a high-level overview of your project's progress. ```bash - /spec status + /spec:status ``` - **Revert work**: Undo a feature or a specific task if needed. ```bash - /spec revert + /spec:revert ``` - **Review work**: Review completed work against guidelines and the plan. ```bash - /spec review + /spec:review ``` ## Commands Reference | Command | Description | Artifacts | | :---------------- | :-------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `/spec setup` | Scaffolds the project and sets up the SDD environment. Run this once per project. | `.gemini/specs/product.md`
`.gemini/specs/product-guidelines.md`
`.gemini/specs/tech-stack.md`
`.gemini/specs/workflow.md`
`.gemini/specs/tracks.md` | -| `/spec create` | Starts a new feature or bug track. Generates `spec.md` and `plan.md`. | `.gemini/specs/tracks//spec.md`
`.gemini/specs/tracks//plan.md`
`.gemini/specs/tracks.md` | -| `/spec implement` | Executes the tasks defined in the current track's plan. | `.gemini/specs/tracks.md`
`.gemini/specs/tracks//plan.md` | -| `/spec status` | Displays the current progress of the tracks file and active tracks. | Reads `.gemini/specs/tracks.md` | -| `/spec revert` | Reverts a track, phase, or task by analyzing git history. | Reverts git history | -| `/spec review` | Reviews completed work against guidelines and the plan. | Reads `plan.md`, `product-guidelines.md` | +| `/spec:setup` | Scaffolds the project and sets up the SDD environment. Run this once per project. | `.gemini/specs/product.md`
`.gemini/specs/product-guidelines.md`
`.gemini/specs/tech-stack.md`
`.gemini/specs/workflow.md`
`.gemini/specs/tracks.md` | +| `/spec:create` | Starts a new feature or bug track. Generates `spec.md` and `plan.md`. | `.gemini/specs/tracks//spec.md`
`.gemini/specs/tracks//plan.md`
`.gemini/specs/tracks.md` | +| `/spec:implement` | Executes the tasks defined in the current track's plan. | `.gemini/specs/tracks.md`
`.gemini/specs/tracks//plan.md` | +| `/spec:status` | Displays the current progress of the tracks file and active tracks. | Reads `.gemini/specs/tracks.md` | +| `/spec:revert` | Reverts a track, phase, or task by analyzing git history. | Reverts git history | +| `/spec:review` | Reviews completed work against guidelines and the plan. | Reads `plan.md`, `product-guidelines.md` | [Conductor]: https://github.com/gemini-cli-extensions/conductor diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index 7df1de61f1..2bd1d68a16 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md @@ -1393,6 +1393,11 @@ their corresponding top-level category object in your `settings.json` file. - **Default:** `true` - **Requires restart:** Yes +- **`experimental.sdd`** (boolean): + - **Description:** Enable built-in Spec-Driven Development (SDD) workflow. + - **Default:** `false` + - **Requires restart:** Yes + - **`experimental.taskTracker`** (boolean): - **Description:** Enable task tracker tools. - **Default:** `false` diff --git a/packages/cli/src/config/extension-manager.test.ts b/packages/cli/src/config/extension-manager.test.ts index b3351832df..07b6ee5e26 100644 --- a/packages/cli/src/config/extension-manager.test.ts +++ b/packages/cli/src/config/extension-manager.test.ts @@ -791,7 +791,7 @@ describe('ExtensionManager', () => { ); expect(emitSpy).toHaveBeenCalledWith( 'warning', - expect.stringContaining('/spec setup'), + expect.stringContaining('/spec:setup'), ); }); diff --git a/packages/cli/src/config/extension-manager.ts b/packages/cli/src/config/extension-manager.ts index a5da221df0..f6cb28e6a0 100644 --- a/packages/cli/src/config/extension-manager.ts +++ b/packages/cli/src/config/extension-manager.ts @@ -692,7 +692,7 @@ Would you like to attempt to install via "git clone" instead?`, (e) => e.name === 'conductor', ); if (conductorIdx !== -1) { - const message = `The "conductor" extension has been replaced by built-in Spec-Driven Development. Your project files in "/conductor" are preserved. Run "/spec setup" to get started.`; + const message = `The "conductor" extension has been replaced by built-in Spec-Driven Development. Your project files in "/conductor" are preserved. Run "/spec:setup" to get started.`; debugLogger.warn(message); coreEvents.emitFeedback('warning', message); } diff --git a/packages/core/src/extensions/builtin/sdd/commands/spec/create.toml b/packages/core/src/extensions/builtin/sdd/commands/spec/create.toml index 1791dd658f..ae7a6ec5c6 100644 --- a/packages/core/src/extensions/builtin/sdd/commands/spec/create.toml +++ b/packages/core/src/extensions/builtin/sdd/commands/spec/create.toml @@ -19,7 +19,7 @@ PLAN MODE PROTOCOL: Parts of this process run within Plan Mode. While in Plan Mo 2. **Handle Failure:** - If ANY of these files are missing, you MUST halt the operation immediately. - - Announce: "SDD is not set up. Please run `/spec setup` to set up the environment." + - Announce: "SDD is not set up. Please run `/spec:setup` to set up the environment." - Do NOT proceed to New Track Initialization. --- @@ -179,6 +179,6 @@ PLAN MODE PROTOCOL: Parts of this process run within Plan Mode. While in Plan Mo - **Announce:** Inform the user you are committing the **Tracks Registry** changes. - **Commit Changes:** Stage the **Tracks Registry** files and commit with the message `chore(conductor): Add new track ''`. 9. **Announce Completion:** Inform the user: - > "New track '' has been created and added to the tracks file. You can now start implementation by running `/spec implement`." + > "New track '' has been created and added to the tracks file. You can now start implementation by running `/spec:implement`." """ \ No newline at end of file diff --git a/packages/core/src/extensions/builtin/sdd/commands/spec/implement.toml b/packages/core/src/extensions/builtin/sdd/commands/spec/implement.toml index 94dac64e42..540f63488e 100644 --- a/packages/core/src/extensions/builtin/sdd/commands/spec/implement.toml +++ b/packages/core/src/extensions/builtin/sdd/commands/spec/implement.toml @@ -15,7 +15,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai - **Tech Stack** - **Workflow** -2. **Handle Failure:** If ANY of these are missing (or their resolved paths do not exist), Announce: "SDD is not set up. Please run `/spec setup`." and HALT. +2. **Handle Failure:** If ANY of these are missing (or their resolved paths do not exist), Announce: "SDD is not set up. Please run `/spec:setup`." and HALT. --- @@ -23,7 +23,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai ## 2.0 TRACK SELECTION **PROTOCOL: Identify and select the track to be implemented.** -1. **Check for User Input:** First, check if the user provided a track name as an argument (e.g., `/spec implement `). +1. **Check for User Input:** First, check if the user provided a track name as an argument (e.g., `/spec:implement `). 2. **Locate and Parse Tracks Registry:** - Resolve the **Tracks Registry**. @@ -192,7 +192,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai 3. **Handle User Response:** * **If user chooses "Review":** - * Announce: "Please run `/spec review` to verify your changes. You will be able to archive or delete the track after the review." + * Announce: "Please run `/spec:review` to verify your changes. You will be able to archive or delete the track after the review." * **If user chooses "Archive":** i. **Create Archive Directory:** Check for the existence of `.gemini/specs/archive/`. If it does not exist, create it. ii. **Archive Track Folder:** Move the track's folder from its current location (resolved via the **Tracks Directory**) to `.gemini/specs/archive/`. diff --git a/packages/core/src/extensions/builtin/sdd/commands/spec/revert.toml b/packages/core/src/extensions/builtin/sdd/commands/spec/revert.toml index 0b13a27003..dbdfae7d09 100644 --- a/packages/core/src/extensions/builtin/sdd/commands/spec/revert.toml +++ b/packages/core/src/extensions/builtin/sdd/commands/spec/revert.toml @@ -20,7 +20,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai 2. **Verify Track Exists:** Check if the **Tracks Registry** is not empty. -3. **Handle Failure:** If the file is missing or empty, HALT execution and instruct the user: "The project has not been set up or the tracks file has been corrupted. Please run `/spec setup` to set up the plan, or restore the tracks file." +3. **Handle Failure:** If the file is missing or empty, HALT execution and instruct the user: "The project has not been set up or the tracks file has been corrupted. Please run `/spec:setup` to set up the plan, or restore the tracks file." --- @@ -29,7 +29,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai 1. **Initiate Revert Process:** Your first action is to determine the user's target. -2. **Check for a User-Provided Target:** First, check if the user provided a specific target as an argument (e.g., `/spec revert track `). +2. **Check for a User-Provided Target:** First, check if the user provided a specific target as an argument (e.g., `/spec:revert track `). * **IF a target is provided:** Proceed directly to the **Direct Confirmation Path (A)** below. * **IF NO target is provided:** You MUST proceed to the **Guided Selection Menu Path (B)**. This is the default behavior. diff --git a/packages/core/src/extensions/builtin/sdd/commands/spec/review.toml b/packages/core/src/extensions/builtin/sdd/commands/spec/review.toml index 190853f765..ca5c81301d 100644 --- a/packages/core/src/extensions/builtin/sdd/commands/spec/review.toml +++ b/packages/core/src/extensions/builtin/sdd/commands/spec/review.toml @@ -26,7 +26,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai 2. **Handle Failure:** - If ANY of these files are missing, list the missing files, then you MUST halt the operation immediately. - - Announce: "SDD is not set up. Please run `/spec setup` to set up the environment." + - Announce: "SDD is not set up. Please run `/spec:setup` to set up the environment." - Do NOT proceed to Review Protocol. --- diff --git a/packages/core/src/extensions/builtin/sdd/commands/spec/setup.toml b/packages/core/src/extensions/builtin/sdd/commands/spec/setup.toml index 7c7d7ec3e7..6923d66622 100644 --- a/packages/core/src/extensions/builtin/sdd/commands/spec/setup.toml +++ b/packages/core/src/extensions/builtin/sdd/commands/spec/setup.toml @@ -41,7 +41,7 @@ PLAN MODE PROTOCOL: This setup process runs entirely within Plan Mode. While in | Artifact Exists | Target Section | Announcement | | :--- | :--- | :--- | -| All files in `tracks//` (`spec`, `plan`, `metadata`, `index`) | **HALT** | "The project is already initialized. Use `/spec create` or `/spec implement`." | +| All files in `tracks//` (`spec`, `plan`, `metadata`, `index`) | **HALT** | "The project is already initialized. Use `/spec:create` or `/spec:implement`." | | `index.md` (top-level) | **Section 3.0** | "Resuming setup: Scaffolding is complete. Next: generate the first track. (Note: If an incomplete track folder was detected, we will restart this step to ensure a clean, consistent state)." | | `workflow.md` | **Section 2.6** | "Resuming setup: Workflow is defined. Next: generate project index." | | `code_styleguides/` | **Section 2.5** | "Resuming setup: Guides/Tech Stack configured. Next: define project workflow." | @@ -530,5 +530,5 @@ PLAN MODE PROTOCOL: This setup process runs entirely within Plan Mode. While in - Check if it contains a rule that might ignore the `.gemini/specs/` directory (e.g., `.gemini/`). - To ensure these artifacts are always shared with the team, append `!.gemini/specs/` to the end of the `.gitignore` file if it is not already explicitly exempted. 2. **Save SDD Files:** Add and commit all files with the commit message `conductor(setup): Add conductor setup files`. -3. **Next Steps:** Inform the user that they can now begin work by running `/spec implement`. +3. **Next Steps:** Inform the user that they can now begin work by running `/spec:implement`. """ \ No newline at end of file diff --git a/packages/core/src/extensions/builtin/sdd/commands/spec/status.toml b/packages/core/src/extensions/builtin/sdd/commands/spec/status.toml index fbe4463284..0860ddd83c 100644 --- a/packages/core/src/extensions/builtin/sdd/commands/spec/status.toml +++ b/packages/core/src/extensions/builtin/sdd/commands/spec/status.toml @@ -19,7 +19,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai 2. **Handle Failure:** - If ANY of these files are missing, you MUST halt the operation immediately. - - Announce: "SDD is not set up. Please run `/spec setup` to set up the environment." + - Announce: "SDD is not set up. Please run `/spec:setup` to set up the environment." - Do NOT proceed to Status Overview Protocol. --- diff --git a/schemas/settings.schema.json b/schemas/settings.schema.json index f85a39bb35..e83934981a 100644 --- a/schemas/settings.schema.json +++ b/schemas/settings.schema.json @@ -2382,6 +2382,13 @@ "default": true, "type": "boolean" }, + "sdd": { + "title": "Spec-Driven Development (SDD)", + "description": "Enable built-in Spec-Driven Development (SDD) workflow.", + "markdownDescription": "Enable built-in Spec-Driven Development (SDD) workflow.\n\n- Category: `Experimental`\n- Requires restart: `yes`\n- Default: `false`", + "default": false, + "type": "boolean" + }, "taskTracker": { "title": "Task Tracker", "description": "Enable task tracker tools.",