Skip to content

[FEATURE] Make it simple to fetch github issues deterministically #280

Description

@edenreich

Summary

Often asking an LLM to fetch a github issue results in few extra unnecessary tokens, perhaps a better approach would be to implement a shortcut that deterministically fetches the github issue.

List issues, and get a specific issue with comments are essential for augmenting valuable common context.

Acceptance Criteria

  • The shortcuts /scm issues and /scm issues ` are implemented to quickly get more context on what to work on
  • The shortcuts do not use any LLM - they reflect a simple github API call that returns structured data for the LLM
  • It's documented
  • It's tested

Activity

  1. added
    enhancement
    on Nov 28, 2025
  2. changed the title [-][FEATURE] Make it simple to view current github issues /scm issues list[/-] [+][FEATURE] Make it simple to fetch github issues deterministically[/+] on Nov 28, 2025
  3. edenreich commented on Nov 28, 2025

    @edenreich
    ContributorAuthor

    @claude Can you work on this? I think this feature is essential, maybe since those are just gh cli based commands we can create them as yaml in .infer/shortcuts as a default preset?

  4. claude commented on Nov 28, 2025

    @claude
    Contributor

    Claude finished @edenreich's task —— View job • claude/issue-280-20251128-1846 • Create PR ➔


    Implementation Complete ✅

    I've successfully implemented the GitHub issue listing shortcuts for the SCM command as requested in issue #280.

    What Was Implemented

    New Shortcuts Added:

    • /scm issues - Lists all GitHub issues for the repository (up to 20 most recent)
    • /scm issues <number> - Shows detailed information for a specific issue including comments

    Key Features:

    ✅ Deterministic fetching - Uses GitHub CLI (gh) directly, no LLM tokens consumed for API calls
    ✅ Structured JSON output - Returns clean JSON data that the LLM can easily analyze
    ✅ Rich issue data - Includes issue number, title, body, state, author, labels, comments, and timestamps
    ✅ Error handling - Clear error messages if gh CLI is not installed or authenticated
    ✅ Comprehensive tests - Full test coverage for new functionality
    ✅ Documentation - Updated README.md with detailed usage instructions

    Implementation Details:

    The shortcuts extend the existing SCMShortcut struct and:

    1. Check for gh CLI availability before execution
    2. Execute appropriate gh issue commands with JSON output
    3. Format the JSON response in markdown for LLM consumption
    4. Return structured data without any LLM involvement

    Testing:

    All tests pass successfully:

    • Unit tests for CanExecute() logic
    • Tests for formatting functions
    • Integration with existing SCM shortcut tests

    Files Changed:

    • internal/shortcuts/scm.go - Added issue listing functionality
    • internal/shortcuts/scm_test.go - Added comprehensive test coverage
    • README.md - Added SCM Shortcuts documentation section

    Usage Example:

    # In the CLI chat:
    /scm issues                 # List all issues
    /scm issues 280            # View details for issue #280

    The LLM can then analyze the JSON output to understand what work needs to be done without consuming tokens on the initial data fetch.


  5. added a commit that references this issue on Nov 28, 2025
    d143d0b
  6. added a commit that references this issue on Nov 28, 2025
    80aaebc
  7. inference-gateway-releaser commented on Nov 28, 2025

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.70.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementreleased

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions