> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sudocode.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Spec Management

> Writing and managing specifications in sudocode

## Spec Writing & Updating

Specs are a powerful way for users to express intent for what they are trying to build.

## Step 1: Create a Spec

<Frame>
  <img src="https://mintcdn.com/sudocode/MO2Drlz_NEwnOn-1/images/walkthroughs/workflow-example/create-spec.png?fit=max&auto=format&n=MO2Drlz_NEwnOn-1&q=85&s=0af84771a1f7a62f8e217290d35143af" alt="sudocode spec board" width="3800" height="1972" data-path="images/walkthroughs/workflow-example/create-spec.png" />
</Frame>

The web server provides a way to co-author specifications by talking to your coding agent, plugged directly into sudocode.

Describe what you want directly to your agent. This will spawn an execution, where the agent can gather context from your repository, while you provide any additional intent or feedback.

<Frame>
  <img src="https://mintcdn.com/sudocode/jD7tbur9b9xr5ZvW/images/walkthroughs/workflow-example/write-spec.png?fit=max&auto=format&n=jD7tbur9b9xr5ZvW&q=85&s=a0e87b272891fcc9d49178f02698d93c" alt="sudocode spec creation" width="3838" height="1994" data-path="images/walkthroughs/workflow-example/write-spec.png" />
</Frame>

## Step 2: Direct Edit, Co-edit, and Plan Implementation

Once you create your spec, you'll be able to:

* View and edit rendered markdown directly
* Navigate between linked relationships and linked entities using `[[spec-id]]` references
* Co-edit specs with an agent collaboratively
* Plan and write implementation tasks with an agent

<Frame>
  <img src="https://mintcdn.com/sudocode/MO2Drlz_NEwnOn-1/images/specs/plan-implement-edit-spec.png?fit=max&auto=format&n=MO2Drlz_NEwnOn-1&q=85&s=cb145a355a92d0b75269e02a43e9d7e2" alt="sudocode spec editor" width="3836" height="1980" data-path="images/specs/plan-implement-edit-spec.png" />
</Frame>

## Step 3: Implement Your Spec with a Workflow

Once you've planned your spec's implementation and created issues, you'll be able to run a workflow to implement all open issues on your spec. This will dispatch a workflow agent that will spawn a series of agents to implement each task in sequential order, based on the dependencies of your issues.

<Frame>
  <img src="https://mintcdn.com/sudocode/MO2Drlz_NEwnOn-1/images/specs/run-spec-workflow.png?fit=max&auto=format&n=MO2Drlz_NEwnOn-1&q=85&s=ceb763e2254bf6a4ae7446af6a05123f" alt="sudocode spec run workflow" width="3834" height="1996" data-path="images/specs/run-spec-workflow.png" />
</Frame>

## Best Practices

As you create, plan, and implement your specs, follow these best practices:

<AccordionGroup>
  <Accordion title="Start with Clear Requirements">
    Write specs that clearly define what should be built and why. Focus on abstractions and requirements, and less on implementation details.
  </Accordion>

  <Accordion title="Use References Liberally">
    Connect specs to related specs, issues, and other entities. Use the agent edit mode to discover and add references as needed.
  </Accordion>

  <Accordion title="Break Specs Down Hierarchically">
    Specs can be decomposed into smaller sub-specs. Use relationships and references to model this hierarchy for clarity.
  </Accordion>

  <Accordion title="Review Agent Feedback">
    When agents implement issues, they provide feedback about what worked and what didn't. Use this to improve your specs over time.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Spec-Driven Development Tutorial" icon="graduation-cap" href="/examples/spec-driven-development">
    Follow a complete workflow from spec creation to implementation
  </Card>

  <Card title="Issue Management" icon="list-check" href="/web/issue-management">
    Manage issues in the web interface
  </Card>

  <Card title="CLI Spec Commands" icon="terminal" href="/cli/spec-create">
    Use the command-line interface
  </Card>

  <Card title="Core Concepts: Specs" icon="book" href="/concepts/specs">
    Understand spec fundamentals
  </Card>
</CardGroup>
