You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+66Lines changed: 66 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,72 @@ The state machine drives the entire flow. Each state uses GitHub MCP tools via s
20
20
21
21
---
22
22
23
+
## Diagrams
24
+
25
+
### State Machine
26
+
27
+
```mermaid
28
+
stateDiagram-v2
29
+
direction LR
30
+
[*] --> Idle
31
+
Idle --> Analyzing
32
+
Analyzing --> Branching
33
+
Branching --> Editing
34
+
Editing --> Validating
35
+
Validating --> Committing
36
+
Committing --> PrCreating
37
+
PrCreating --> Reviewing
38
+
Reviewing --> Documenting
39
+
Documenting --> [*]
40
+
```
41
+
42
+
**State descriptions:**
43
+
44
+
-**Idle** — Fetches repository metadata and full issue body from GitHub via MCP. Reads labels and default branch.
45
+
-**Analyzing** — Asks Claude to produce an implementation plan: branch name, files to modify, summary, and whether tests are required. Retries up to 3 times if JSON parse fails.
46
+
-**Branching** — Creates a new feature branch from the default branch. Idempotent: if the branch already exists, resumes from it.
47
+
-**Editing** — For each file in the plan, runs a ReAct loop: reads current content, asks Claude to edit it, commits the result via `create_or_update_file`. Max 20 turns per file.
48
+
-**Validating** — Runs four gates: file safety blocklist, merge conflict pre-flight, diff size, and test coverage intent. Blocks on critical failures; warns on soft failures.
49
+
-**Committing** — Confirms the final commit SHA is present on the branch by calling `get_branch`. Records the commit URL.
50
+
-**PrCreating** — Generates a PR title and body via Claude, then opens the pull request. Idempotent: checks for an existing open PR from the same branch before creating.
51
+
-**Reviewing** — Posts a bot review comment explaining what changed and why. Requests reviewers from `GSD_REVIEWERS` env var if configured.
52
+
-**Documenting** — Updates `docs/github-mcp-tools.md` and `CHANGELOG.md` on the default branch. If `GSD_AUTO_MERGE=true`, squash-merges the PR.
0 commit comments