Skip to content

Fix #23: Improve safety gates signals to start work to make work more interactive#27

Merged
max-tet merged 1 commit into
mainfrom
clayde/issue-23-interactive-safety-gates
Mar 13, 2026
Merged

Fix #23: Improve safety gates signals to start work to make work more interactive#27
max-tet merged 1 commit into
mainfrom
clayde/issue-23-interactive-safety-gates

Conversation

@ClaydeCode

Copy link
Copy Markdown
Owner

Closes #23

- Replace authorization gate with content filtering: any assigned issue is a
  candidate, but LLM only sees comments/bodies created by or approved (👍) by
  whitelisted users. Issues with no visible content are skipped.

- Two-phase planning: preliminary plan (short overview + questions) →
  approval → thorough implementation plan → approval → implementation.

- New comment detection: when new visible comments arrive during
  awaiting_preliminary_approval or awaiting_plan_approval, the plan is
  updated (existing comment edited + change summary posted).

- Blocked issue detection: skip issues with 'blocked by #N' / 'depends on #N'
  in body text, and check GitHub sub-issue relationships via timeline API.

- Post-PR review handling: assign issue author as reviewer after PR creation;
  monitor for reviews and address comments in new addressing_review state.

- New state machine:
  (none) → preliminary_planning → awaiting_preliminary_approval
         → planning → awaiting_plan_approval → implementing → pr_open → done

- Backward compatibility: old 'awaiting_approval' status mapped to
  'awaiting_plan_approval'.

New files:
- src/clayde/prompts/preliminary_plan.j2
- src/clayde/prompts/thorough_plan.j2
- src/clayde/prompts/update_plan.j2
- src/clayde/prompts/address_review.j2
- src/clayde/tasks/review.py
- tests/test_tasks_review.py

Modified files:
- src/clayde/safety.py (content filtering replaces authorization gate)
- src/clayde/github.py (blocked detection, PR review helpers, edit_comment)
- src/clayde/orchestrator.py (new dispatch logic for all states)
- src/clayde/tasks/plan.py (two-phase planning + update support)
- src/clayde/tasks/implement.py (reviewer assignment, pr_open status)
- CLAUDE.md (updated documentation)
- All corresponding test files updated (206 tests passing)
@max-tet
max-tet merged commit e21dd05 into main Mar 13, 2026
2 checks passed
@max-tet
max-tet deleted the clayde/issue-23-interactive-safety-gates branch March 13, 2026 15:10
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.

Improve safety gates signals to start work to make work more interactive

2 participants