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
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 anAgent 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:
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
- The workflow triggers when the
spec-draft
label is added - The repository is cloned and accessible to the agent
- The agent analyzes both the issue and the codebase
- The generated spec includes references to affected services or files
- 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:- Agent Run Action: Learn more about single-agent execution for simple tasks
- Agent Session Action: Understand multi-agent coordination for complex workflows
- Git Clone Action: Configure repository cloning options
- Agent Differences: Choose the right action type for your use case