Done Workflow
When activated, execute this workflow to complete work and push:
Steps
- •
Determine Issue ID: Extract the issue number from the branch name (e.g.,
BT-10fromBT-10-implement-erlang-codegen). If not in branch name, try:a. Worktree name: If in a git worktree with a name matching
BT-{number}:bash# Check if this is a worktree git rev-parse --git-dir 2>/dev/null | grep -q "worktrees" # Extract issue ID from directory name basename "$(pwd)" | grep -oE '^BT-[0-9]+'
Example:
/workspaces/BT-34→ issueBT-34 - •
Check branch: Verify we're NOT on
mainbranch. If on main, stop and tell the user to create a feature branch first. - •
Run static checks:
bashjust ci
This runs all CI checks (build, clippy, fmt-check, test, test-e2e) that must match exactly what CI runs. If any check fails, report the errors and stop.
- •
Stage changes:
bashgit add -A
- •
Check for changes: Run
git status. If there's nothing to commit, inform the user and stop. - •
Generate commit message: Based on the staged diff (
git diff --cached), create a conventional commit message:- •Use format:
type: short description - •Types:
feat,fix,docs,style,refactor,test,chore - •Keep first line under 72 characters
- •Add bullet points for details if multiple changes
- •Use format:
- •
Commit:
bashgit commit -m "<generated message>"
- •
Push:
bashgit push -u origin HEAD
- •
Create Pull Request: Use the issue ID from step 1. Fetch the Linear issue details. Create a PR:
bashgh pr create --title "<Issue Title> (BT-{number})" --body "<Issue description with link to Linear issue>"The PR body should include:
- •Link to Linear issue:
https://linear.app/beamtalk/issue/BT-{number} - •Brief summary of what was implemented
- •List of key changes
- •Link to Linear issue:
- •
Update Linear acceptance criteria: Get the Linear issue from step 1, review the acceptance criteria, and add a comment marking which criteria have been completed with checkmarks (✅). Format as a structured summary showing what was implemented.
- •
Update Linear state: Mark the Linear issue as "In Review".
- •
Report success: Confirm the commit was pushed, PR was created (include PR URL), and Linear was updated.
When PR is merged
- •Update issue state to "Done"
- •Add
doneagent-state label to indicate completion