dd-bug-fix-workflow

Orchestrates an eight-step bug fix workflow with isolated worktrees, TDD debugging, and CI validation.

Updated Jun 11, 2026
One-click install
npx skills add https://github.com/marcocpt/trae_skills --skill dd-bug-fix-workflow-marcocpt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dd-bug-fix-workflow
Source: https://github.com/marcocpt/trae_skills/tree/main/dd-bug-fix-workflow
Command: npx skills add https://github.com/marcocpt/trae_skills --skill dd-bug-fix-workflow-marcocpt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Fixing bugs ad hoc often leads to skipped root-cause analysis, untested fixes, and lost progress when sessions are interrupted. This Skill enforces a strict eight-step workflow—requirement confirmation, isolated worktree creation, TDD debugging, code sync with CI regression, continuation check, documentation updates, lint and push, and merge cleanup—so every fix is verified and recoverable. ## Core Features & Use Cases - Isolated Git Worktrees: Creates fix branches (fix/{F编号}-{描述}) in separate worktrees based on the latest develop branch, keeping the main workspace clean. - TDD Debugging Discipline: Requires a failing test before any fix, mandates root-cause investigation, and separates XCTest local feedback from XCUITest CI-only validation. - State Persistence & Recovery: Writes a bug-fix-state.json file after every step so the workflow resumes correctly after session compression or interruption. - Use Case: A user reports a hotkey conflict bug. The Skill scans recent logs, creates an isolated worktree, guides a red-green-refactor TDD cycle, pushes for CI regression, updates test documentation, and merges back with --no-ff. ## Quick Start Ask the AI to start the bug fix workflow for the issue described in your latest log file and follow its step-by-step prompts.

Frequently Asked Questions about dd-bug-fix-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a bug using TDD with an isolated git worktree?

Start the bug fix workflow, confirm the bug requirements, and let it create a fix branch worktree from the latest develop branch. Write a failing test that reproduces the bug, investigate the root cause, implement the fix until the test passes, then push for CI regression before merging.

What is the difference between XCTest and XCUITest validation in this workflow?

XCTest unit tests can run locally for fast red-green feedback since they have no GUI dependencies. XCUITest UI tests are forbidden locally because they depend on GUI sessions, Accessibility permissions, and window focus, so they only run in CI after pushing.

Can I use git rebase to sync my fix branch with develop?

No, the workflow enforces a merge-only policy and explicitly forbids rebase. You synchronize upstream changes with `git merge --no-ff origin/develop` or `--ff-only` for pure syncs, resolving conflicts on the fix branch.

What happens if my session is interrupted mid-workflow?

The workflow persists progress in a bug-fix-state.json file updated at every step exit. On recovery, it reads the current_step field or inspects git log to determine whether a fix commit exists, avoiding a restart from step zero.

When should I not use this bug fix workflow?

Skip it for simple text edits, new feature development, or pure documentation changes. It is designed for bugs needing isolated environments and systematic debugging, not quick patches or non-code modifications.