Skip to content

Shepherd v4: AI/LLM Integration, Unified Command Extensions, and Migration Script Enhancements #1020

Description

@aorinevo

This issue tracks enhancements for shepherd v4, focusing on integrating AI support for various Large Language Models (LLMs), streamlining command structure, and improving migration script capabilities.

1. AI/LLM Integration

Introduce a standardized CLI interface for LLM-powered commands, following conventions established by other major CLI tools:

Proposed Syntax:

shepherd "<nlp prompt>" [shepherd-options]
  • The natural language prompt is passed directly to shepherd, then through MCP to the specified LLM provider.
  • The LLM's response is processed according to any additional shepherd options passed via the migration script (might make sense to expose as a cli option).
  • This pattern should extend to other commands, e.g.:
shepherd checkout "<nlp prompt>" [shepherd-options]

2. Command Extensions

  • All core shepherd commands should support natural language prompts and LLM selection.
  • Design should ensure backward compatibility and intuitive user experience, leveraging familiar CLI patterns.

3. Migration Script Enhancements

  • Migration scripts continue to serve as a backbone for compatibility.
  • Scripts should allow specifying LLMs and controlling where they’re applied, providing granular workflow management.
  • The configuration syntax should reflect standards for plug-in extensibility seen in other CLI ecosystems.

Migration Scripts

Ideally, we can provide an MCP offering for each of the fields exposed via yaml. How to implement that is still TBD but the use case is clear.

Want to pass in a search query without having to worry much about the query syntax and interface--perfect use case for MCP.

One approach might be to offer an duplicate parameter suffixed with _mcp but then we have logic everywhere that checks if ends in _mcp do x else do y. What are alternative implementations?

id: 2018.07.16-eslintrc-json
title: Rename all .eslintrc files to .eslintrc.json
adapter:
  type: github
  search_type: code
  search_query: org:NerdWallet path:/ filename:.eslintrc
hooks:
  should_migrate:
    - ls .eslintrc # Check that this file actually exists in the repo
    - git log -1 --format=%cd | grep 2018 --silent # Only migrate things that have seen commits in 2018
  post_checkout: npm install
  apply: mv .eslintrc .eslintrc.json
  pr_message: echo 'Hey! This PR renames `.eslintrc` to `.eslintrc.json`'

References

  • NerdWalletOSS/shepherd: A utility for applying code changes across many repositories.
  • CLI best practices: git, gh, aws CLI, terraform

Next Steps:

  • Solicit feedback on syntax and design from maintainers and users.
  • Prototype LLM integration for selected commands.
  • Draft migration script examples demonstrating LLM targeting.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions