Skip to content

Fix #75: Rework clayde GitHub integration#76

Merged
max-tet merged 1 commit into
mainfrom
clayde/issue-75-simplified-gh-workflow
May 18, 2026
Merged

Fix #75: Rework clayde GitHub integration#76
max-tet merged 1 commit into
mainfrom
clayde/issue-75-simplified-gh-workflow

Conversation

@ClaydeCode
Copy link
Copy Markdown
Owner

Closes #75

Replaced the rigid six-phase state machine (preliminary plan → approval → thorough plan → approval → implement → review) with a simple event-driven loop. Each assigned issue now tracks only last_seen_at, in_progress, branch_name, and pr_url. The orchestrator checks for new whitelist-visible activity since the last timestamp and, if found, invokes a single unified work.py task — Claude decides what to do next (ask questions, post a plan, implement, or address reviews). The five phase-specific prompt templates and three task modules were replaced with work.j2 and tasks/work.py. responses.py now has a single WorkResponse(summary) model. safety.py adds get_new_visible_comments() using datetime comparison and drops is_plan_approved(). Crash recovery uses an in_progress flag set before invocation. PR creation is handled by Claude via gh pr create, with a description summary and recommended reading order for diffs touching more than 3 files; Python detects the resulting PR via find_open_pr() and assigns the issue author as reviewer. README updated to reflect the new event-driven architecture.

Replace the six-phase planning/approval/implementation state machine with a
simple timestamp-based event loop. For each assigned issue, Clayde checks
for new whitelist-visible activity since last_seen_at and invokes Claude
once — Claude decides the next action (ask questions, plan, implement, or
address reviews) without hard phases or approval gates.

Key changes:
- state.py: remove IssueStatus enum and all phase fields; add last_seen_at,
  in_progress, branch_name, pr_url per issue
- orchestrator.py: replace all phase handlers with a single _handle_issue
  that checks timestamps, detects PR review activity, and handles crash
  recovery via in_progress flag
- tasks/: delete plan.py, implement.py, review.py; add work.py — unified
  task that builds full issue context and invokes Claude once
- prompts/: delete five phase-specific templates; add work.j2 — guides
  Claude to engage naturally, implement when ready, create PR with summary
  and recommended reading order for large diffs
- responses.py: replace five models with WorkResponse(summary)
- safety.py: add get_new_visible_comments() using datetime comparison;
  remove is_plan_approved()
- README.md: rewrite to document event-driven loop, remove state machine
  diagram and approval-gate documentation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ClaydeCode ClaydeCode requested a review from max-tet May 18, 2026 15:18
@max-tet max-tet merged commit 1c8a1e6 into main May 18, 2026
3 checks passed
@max-tet max-tet deleted the clayde/issue-75-simplified-gh-workflow branch May 18, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework clayde GitHub integration

2 participants