Turn product ideas into structured specs instantly. This Overcut workflow listens for issues with a specific label—such as spec-draft—and responds by generating a detailed feature specification using an autonomous agent. This workflow includes context from the actual repository, allowing the agent to analyze relevant files, understand dependencies, and surface potential risks or integration points.

Create a New Use Case

1

Open the Use Cases page

In the sidebar, click Use Cases, then select Create Use Case.
2

Name your Use Case

Use a clear name like Spec Draft from Issue or Label-Based Spec Generator.

Set up the Label Trigger

1

Edit the Trigger block

Click the default trigger block in the canvas to edit it.
2

Select Label Added

Choose Issue Label Added as the trigger type.
3

Set the Label Condition

Specify the label that will trigger this workflow. For example: spec-draft.
You can restrict the trigger to specific repositories or issue authors if needed.
4

Configure delay (optional)

Consider setting a delay of 5-10 seconds to allow time for:
  • Issue description to be completed
  • Additional labels to be added
  • Initial comments to be posted
This ensures the agent has complete context before generating the spec.
The delay is optional and defaults to immediate execution. Interactive triggers like mentions always execute immediately regardless of delay settings.

Clone the Repository

To allow the agent to reference real code, we’ll first clone the repository where the issue lives. This provides context on architecture, data models, or related files.
1

Add the Clone Repo block

Drag Clone Repo to the canvas and connect it to the trigger node.
2

Configure the repo and branch

Use these dynamic values:
  • Repository: {{trigger.repository.name}}
  • Branch: {{trigger.repository.defaultBranch}}
3

Set the alias

You may give the repo an alias like project-repo to help the agent refer to it in natural language.

Add the Spec Drafting Agent

We’ll use an Agent Session block to generate the spec from the issue context and the codebase, and be able to have a conversation with the agent on the results.
1

Add the Agent Session block

Drag agent.session onto the canvas and connect it to the Clone Repo block.
2

Assign the Spec Writer Agent

Choose a Product Manager agent.
3

Configure the instructions

Use this prompt to guide the agent:
You are acting as a Product Manager preparing a spec for a new feature.

Your task is to write a structured feature spec based on the issue's title and description, along with context from the codebase.

The spec should include:

1. **Overview** – What is being requested and why  
2. **Goals** – What the feature should achieve  
3. **Non-Goals** – What's explicitly out of scope  
4. **User Stories** – Who benefits and how  
5. **Technical Challenges** – Potential complications, edge cases, or risks  
6. **Impact on Current Code** – What parts of the codebase are affected, including references to services, models, or files  
7. **Open Questions** – Areas that require clarification

Reference the repository to identify which parts of the system will be impacted or extended.

Look for:
- Existing services or modules that might be reused or modified  
- Data models or APIs related to the requested feature  
- Files or folders mentioned in the issue (if any)

Output the final spec in clean, well-formatted Markdown. Post it as a comment in the original issue.

Test the Workflow

1

Create a new issue

Open a GitHub issue describing a new feature, improvement, or integration that may need a spec.
2

Add the trigger label

Apply the spec-draft label to activate the workflow.
3

Review the spec comment

Overcut will post a Markdown-formatted spec in the issue thread. You should see references to relevant parts of the codebase if applicable.
The agent-generated spec is fully contextual, taking both issue details and repo structure into account.

Expand the Flow

1

Save the spec as a Markdown file

Add a step that creates a new .md file in a designated folder in your documentation repo or opens a PR.
2

Request stakeholder feedback

Mention team members (e.g. @backend, @design) in a follow-up step to review the generated spec.
3

Automatically create tasks

Once the spec is ready, spawn related engineering tasks or GitHub issues for implementation steps.

✅ Success Checklist

  1. The workflow triggers when the spec-draft label is added
  2. The repository is cloned and accessible to the agent
  3. The agent analyzes both the issue and the codebase
  4. The generated spec includes references to affected services or files
  5. The output is posted directly to the issue thread in Markdown

Next Steps

Now that you’ve built a spec generation workflow, explore these related topics: