Skip to content

itdove/devaiflow#363: Add issue key support to daf investigate command#366

Draft
itdove wants to merge 1 commit intomainfrom
363
Draft

itdove/devaiflow#363: Add issue key support to daf investigate command#366
itdove wants to merge 1 commit intomainfrom
363

Conversation

@itdove
Copy link
Copy Markdown
Owner

@itdove itdove commented Apr 6, 2026

GitHub Issue: #363

Description

Added support for creating investigation sessions directly from issue tracker tickets (JIRA, GitHub, GitLab). Users can now run daf investigate <issue-key> to automatically fetch issue details and create a read-only investigation session with the issue summary as the goal and issue description included in the initial prompt.

Key changes:

  • New create_investigation_from_issue() function that auto-detects backend (JIRA/GitHub/GitLab) from issue key format and fetches ticket details
  • Added optional issue_key argument to daf investigate CLI command (supports formats: PROJ-12345, owner/repo#123, #123)
  • Auto-generates session names from issue keys (e.g., investigate-PROJ-12345, investigate-issue-123)
  • Enhanced investigation prompt to include Issue Details section with summary, description, and clickable URL (JIRA only)
  • Updated workflow documentation in daf-workflow skill with comprehensive examples and usage guidance
  • Added comprehensive test coverage for JIRA, GitHub, GitLab integrations and error handling scenarios

Benefits:

  • Seamless workflow from issue tracker to investigation without manual copy-paste
  • Issue context automatically included in AI session prompt
  • Session tracking linked to original issue key
  • Users can still override the goal with --goal flag if needed

Assisted-by: Claude

Testing

Steps to test

  1. Pull down the PR
  2. Set up DevAIFlow configuration with JIRA or GitHub/GitLab credentials
  3. Test JIRA investigation: daf investigate PROJ-12345 --path /path/to/project
  4. Verify that the command fetches the issue details and creates an investigation session
  5. Test GitHub investigation: daf investigate owner/repo#123 --path /path/to/project
  6. Test short form: daf investigate #123 --path /path/to/project (requires git remote detection)
  7. Verify auto-generated session name matches pattern investigate-<issue-key>
  8. Check that investigation prompt includes Issue Details section
  9. Test goal override: daf investigate PROJ-12345 --goal "Custom goal"
  10. Test error handling with invalid issue key: daf investigate PROJ-99999
  11. Run test suite: pytest tests/test_investigate_command.py::TestInvestigateFromIssue -v

Scenarios tested

  • Creating investigation sessions from JIRA issues (PROJ-12345 format)
  • Creating investigation sessions from GitHub issues (Release version 2.0.0 and publish to PyPI #123 and owner/repo#123 formats)
  • Auto-generation of session names from issue keys
  • Goal override functionality with --goal flag
  • Error handling for not found issues, authentication failures, and API errors
  • Custom session names with --name flag
  • Integration of issue description into investigation prompt
  • Backward compatibility with existing daf investigate --goal workflow
  • All test cases pass in tests/test_investigate_command.py

Deployment considerations

  • This code change is ready for deployment on its own

- Add test_investigate_command.py with full test suite
- Fix JiraClient import path in investigate command tests
- Update AGENTS.md and daf-workflow skill documentation
- Enhance investigate_command.py implementation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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.

1 participant