claude-simone icon indicating copy to clipboard operation
claude-simone copied to clipboard

feat(mcp): Add proper GitHub subissue handling to work_issue prompt

Open Helmi opened this issue 1 year ago • 0 comments

Problem

The work_issue prompt currently does not handle GitHub subissues (real linked sub-issues, not task lists). When working on an issue that has subissues, the prompt should:

  1. Detect if an issue has linked subissues
  2. Check if subissues are completed before starting work
  3. Handle subissues based on risk level settings

Proposed Solution

Core Requirements

  • Detect real GitHub subissues (not task list checkboxes - [ ] which LLM handles naturally)
  • Block work on parent issue if subissues are not complete
  • Risk level integration:
    • Risk < 5: Ask user which subissue to work on, get explicit confirmation
    • Risk >= 5 and < 10: Use research to understand subissues, ask for clarification if needed
    • Risk = 10: Autonomously handle subissues without asking

Implementation Notes

  1. After fetching issue details (around line 57), add subissue detection logic
  2. Use GitHub API to check for linked issues (parent/child relationships)
  3. Keep prompt clean - only add essential instructions
  4. For task lists in issue body: Just add brief instruction like "If you find a task list in the issue, ensure each item is included in your implementation plan"

What NOT to do

  • Don't parse task lists manually - LLM understands GitHub Flavored Markdown
  • Don't overcomplicate the prompt with detailed parsing logic
  • Don't update parent issues automatically (GitHub handles this with proper linking)

Acceptance Criteria

  • [ ] Detect when an issue has GitHub subissues
  • [ ] Block work on parent until subissues complete (based on risk level)
  • [ ] Ask user which subissue to tackle (low risk levels)
  • [ ] Work autonomously on subissues (high risk levels)
  • [ ] Maintain clean, minimal prompt additions

Context

This was identified during code review of the work_issue prompt. The current implementation treats all issues as standalone and doesn't consider hierarchical relationships between issues.

Related PR: #73 (adds branch switching and manual testing features)

Helmi avatar Aug 19 '25 08:08 Helmi