From ad07cf84bb33ea15b88f3cce5f370a81afeae2d3 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Fri, 20 Mar 2026 20:52:25 -0400 Subject: [PATCH] Add gh-implement workflow for GitHub issue implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduces a two-stage workflow (plan → implement) that fetches a GitHub issue via `gh issue view`, writes an implementation plan, then delegates to the existing implement workflow. Also removes the unnecessary `backend: api` directive from the implement workflow's model stylesheet. Co-Authored-By: Claude Opus 4.6 (1M context) --- fabro/workflows/gh-implement/workflow.fabro | 20 ++++++++++++++++++++ fabro/workflows/gh-implement/workflow.toml | 4 ++++ fabro/workflows/implement/workflow.fabro | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 fabro/workflows/gh-implement/workflow.fabro create mode 100644 fabro/workflows/gh-implement/workflow.toml diff --git a/fabro/workflows/gh-implement/workflow.fabro b/fabro/workflows/gh-implement/workflow.fabro new file mode 100644 index 000000000..03c8a13cc --- /dev/null +++ b/fabro/workflows/gh-implement/workflow.fabro @@ -0,0 +1,20 @@ +digraph GhImplement { + graph [ + goal="Implement a GitHub issue", + model_stylesheet=" + * { model: claude-opus-4-6; } + " + ] + rankdir=LR + + start [shape=Mdiamond, label="Start"] + exit [shape=Msquare, label="Exit"] + + plan [label="Plan", prompt="Fetch the GitHub issue from the goal using: gh issue view $goal --json title,body,labels,comments\n\nRead the issue title, description, and any comments carefully. Analyze what code changes are needed to resolve the issue.\n\nWrite a detailed implementation plan to plan.md that includes:\n- Summary of the issue\n- Files to create or modify\n- Step-by-step implementation approach\n- Test cases to add or update\n\nThe plan should be specific enough for another agent to implement without seeing the original issue.\n\nRespond with the location of the plan file (plan.md)."] + + implement [label="Implement", shape=house, stack.child_workflow="fabro/workflows/implement/workflow.fabro", manager.max_cycles=100] + + start -> plan + plan -> implement [fidelity="summary:high"] + implement -> exit +} diff --git a/fabro/workflows/gh-implement/workflow.toml b/fabro/workflows/gh-implement/workflow.toml new file mode 100644 index 000000000..0ec3f59de --- /dev/null +++ b/fabro/workflows/gh-implement/workflow.toml @@ -0,0 +1,4 @@ +version = 1 + +[github] +permissions = { issues = "read", pull_requests = "write" } diff --git a/fabro/workflows/implement/workflow.fabro b/fabro/workflows/implement/workflow.fabro index c4f77165a..4557ff448 100644 --- a/fabro/workflows/implement/workflow.fabro +++ b/fabro/workflows/implement/workflow.fabro @@ -2,7 +2,7 @@ digraph ImplementAndSimplify { graph [ goal="Implement and simplify", model_stylesheet=" - * { backend: api; model: claude-opus-4-6;} + * { model: claude-opus-4-6; } " ] rankdir=LR