Help Center/ CodeArts Agent/ Best Practices/ Standard Workflow and Slash Command Practices in SDD
Updated on 2026-08-03 GMT+08:00

Standard Workflow and Slash Command Practices in SDD

The Spec-Driven Development (SDD) mode of CodeArts Agent is a specification-centric software development method. After developers provide requirement descriptions, the agent generates specifications, design solutions, and task plans in sequence. This helps developers and the agent reach a consensus on the task objectives and implementation solutions before coding, ultimately producing high-quality code.

The SDD mode of CodeArts Agent uses a four-phase progressive process, as shown in Figure 1.

Figure 1 SDD procedure and outputs

Based on this, CodeArts Agent provides two usage modes:

  • Standard SDD workflow: After the agent's dialog switches to the spec-driven mode, the agent takes the lead in the process and executes the tasks in the sequence shown in Figure 1. After the outputs of each phase are manually confirmed, the next phase is executed.
  • Slash command mode: Developers can use slash commands shown in Table 1 to skip or repeat any phase.
    Table 1 SDD slash commands

    Command

    Function

    Input

    Output

    /sdd-new

    Creates requirement specifications.

    Requirement description

    spec.md

    /sdd-design

    Creates a technical design document.

    Name of the folder where spec.md is located

    design.md

    /sdd-tasks

    Creates coding tasks.

    Name of the folder where spec.md and design.md are located

    tasks.md

    /sdd-apply

    Executes coding tasks.

    Name of the folder where tasks.md is located

    Code file

This section uses the example of developing user registration and login functions for a web application to compare the differences and application scenarios of the two modes.

Preparations

Before using CodeArts Agent, create a project to store various files in the project. After the project is created, enable the auto approval function. In this way, AI will automatically perform related operations without manual intervention.

  1. Log in to CodeArts Agent by referring to Quick Start.
  2. Create a project for storing files.

    1. On the top menu bar of the IDE, choose File > New > Create Project to go to the page for creating a project.
    2. Select a path for storing the project, enter the project name (for example, SDD_Demo), and click OK.

      The project name must start with a letter, and can contain a maximum of 64 characters. Letters, digits, hyphens (-), and underscores (_) are allowed.

      After the project is created, you can view the created SDD_DEMO project under EXPLORER.

  3. (Optional) Select the agent running mode and authorize automatic operations.

    1. Click in the upper right corner of CodeArts Agent IDE to go to the Settings page.
    2. Choose Chats > Agents > Terminal Command Running Mode, select the running policy for the agent to execute terminal commands. This section uses the default running policy (Running in Sandbox).
    3. Choose Chats > Auto-approve, and click to enable the required items.

      After authorization, tasks for generating complex project-level code are executed automatically. Without authorization, some operations will need your manual confirmation when you code with CodeArts Agent.

      Enabling auto approval can lead to operational risks. Assess these risks carefully first and only enable this feature in a secure and trustworthy environment.

      Table 2 Parameters for auto approval

      Parameter

      Description

      Example

      Edit

      Allows the agent to call tools like edit, write, and deleteFile to edit files on your computer.

      Enabled

      Browser Access

      Allows the agent to access websites in the browser.

      Enabled

      Web Crawler

      Allows the agent to access and capture specified web page content.

      Enabled

    4. Exit the current page to complete the authorization.

Standard SDD Workflow

The standard SDD workflow is a built-in spec-driven mode of CodeArts Agent. After you select spec-driven on the chat panel and enter the requirement description, the agent will execute the preset workflow step by step. First, it generates the requirement specification document spec.md. After you confirm that the document is correct, the agent automatically creates a solution and generates the design.md document. Then, it generates the task list tasks.md and finally executes the coding. The entire process is driven by AI, and you only need to confirm the key nodes (accept or reject the generated documents).

  1. At the bottom of the input box on the chat panel, choose Built-in > Agent to switch to the agent mode. The selected model is displayed on the right. You can select a model as required from the drop-down list.

    If the chat panel of CodeArts Agent is not displayed, click (Expand AI Sidebar) in the upper right corner of the top menu bar to open it.

  2. On the chat panel, click Spec-driven.
  3. In the input box on the CodeArts Agent chat panel, enter the following prompts and click :

    Develop a user login API that supports identity authentication using a username and password. After successful authentication, return a JWT token. If the login fails, record the number of failed attempts. If the login fails for five consecutive times, lock the account for 15 minutes.

  4. View the generated requirement specification document spec.md. Provide modification suggestions to enable CodeArts Agent to modify spec.md accordingly.

    Resolve the following issues:
    After a successful login, return the token and basic user information (nickname and role).
    The lockout duration of 15 minutes is too long. Change it to 5 minutes.
    Add rate limiting to the API: maximum 10 requests per minute per IP address.
    Do not use the response code 200. Use the service code 20000 to indicate success.

  5. View the modified spec.md document again. After confirming that the requirements are correctly understood, click Start Create Solution.
  6. View the generated design.md document. After confirming that the technical solution is reasonable, click Start Plan Coding Tasks.
  7. View the generated tasks.md document. After confirming that the task breakdown is complete, click Start Execute Tasks.
  8. Wait until the task is complete. After it is complete, the complete code is generated, and three process documents are generated: spec.md, design.md, and tasks.md.

Slash Command Mode

CodeArts Agent encapsulates underlying skills to define four standard slash commands. Developers can execute commands as needed based on the existing process deliverables, without the need to re-execute the entire process. For example, if you find that the encryption library is outdated while executing the /sdd-apply command, manually modify the design.md document, and then run the /sdd-tasks and /sdd-apply commands in sequence.

  1. At the bottom of the input box on the chat panel, choose Built-in > Agent to switch to the agent mode. The selected model is displayed on the right. You can select a model as required from the drop-down list.

    If the chat panel of CodeArts Agent is not displayed, click (Expand AI Sidebar) in the upper right corner of the top menu bar to open it.

  2. On the chat panel, click Vibe Coding.
  3. Execute commands as needed to complete SDD.

    • /sdd-new: creates requirement specifications.
      1. Enter a slash (/) in the dialog box and choose /sdd-new from the displayed menu. Enter the following requirement description to generate a spec.md document in a unified format:
        Help me develop a user registration and login module, including mobile number/email address registration, JWT-based login authentication, verification code sending, and password resetting.
      2. Go to <project_root>/.codeartsdoer/specs/<output_folder> to obtain the generated spec.md.
        Figure 2 Directory of spec.md
      3. Review the current requirement specification document. You can modify the spec.md document manually or using the agent until the requirement specification document meets the service expectations.
    • /sdd-design: creates a technical design document.

      If you already have a spec.md document, you can directly execute /sdd-design and enter the output folder name (for example, user_auth) to generate a design.md document that contains the architecture and API description.

    • /sdd-tasks: creates a coding task list.

      Enter a slash (/) in the dialog box, choose /sdd-tasks from the displayed menu, and enter the output folder name (for example, user_auth) to generate an executable task list tasks.md.

    • /sdd-apply: executes coding tasks.

      Enter a slash (/) in the dialog box, choose /sdd-apply from the displayed menu, and enter the output folder name (for example, user_auth). CodeArts Agent executes coding tasks one by one based on the tasks.md document.

Scenario-based Offerings

In actual development, the standard SDD workflow and slash command modes are not mutually exclusive. Instead, they can be flexibly switched based on different project phases and team roles. In the early stage of a new project, use the standard workflow to quickly set up the framework and establish a complete SDD documentation system. In the mid-term iteration, switch to the slash command mode and use the four commands for incremental development and partial refactoring.

Table 3 Core differences

Dimension

Standard SDD Workflow

Slash Command Mode

Execution mode

Enter requirements in the dialog box. The agent leads the process, and you can accept or reject the generated documents at key nodes.

Execute commands in the dialog box. You can independently drive the process.

Flexibility

The process is fixed and cannot be skipped.

Individual commands can be freely combined and repeatedly executed.

Application scenario

  • New project initiation from scratch

    The team builds a complete SDD process from requirement analysis, system design, to the SDD document system.

  • Formal projects with high standardization requirements

    In scenarios with high requirements on consistency and verifiability, all development activities are carried out based on the specified specifications to ensure that the final functions and performance are highly consistent with the specifications.

  • Getting started with SDD

    Developers who are new to SDD can quickly establish a complete link through the step-by-step guidance of CodeArts Agent.

  • Projects with relatively stable requirements

    Requirements have been fully discussed, and the direction and solution will not be frequently adjusted during development.

  • Projects with frequent requirement iterations or unclear requirements that need repeated confirmation

    If a product manager suddenly changes the login logic, the manager only needs to manually modify spec.md, and then executes /sdd-design and /sdd-tasks in sequence. There is no need to regenerate spec.md.

  • Multi-person asynchronous collaboration

    An architect creates design.md in the morning and submits it to Git. After a developer pulls the code in the afternoon, the developer only needs to execute /sdd-tasks and /sdd-apply in the chat box.

  • Partial documents available

    If you have manually written spec.md and want to start the design directly, simply type /sdd-design to proceed with the subsequent process.

Roles involved

Product managers quickly validate ideas.

Independent developers work on small projects.

Architects review technical solutions.

Team members collaborate to develop enterprise-level applications.