Skip to content

Add create-shared-agentic-workflow prompt and DeepWiki MCP integration#1303

Merged
pelikhan merged 11 commits intomainfrom
copilot/create-shared-agentic-workflow
Oct 7, 2025
Merged

Add create-shared-agentic-workflow prompt and DeepWiki MCP integration#1303
pelikhan merged 11 commits intomainfrom
copilot/create-shared-agentic-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 7, 2025

Create Shared Agentic Workflow Prompt and DeepWiki Integration

This PR adds a new GitHub Copilot prompt file (/create-shared-agentic-workflow) that teaches best practices for wrapping MCP servers as shared agentic workflows, and applies it by creating a DeepWiki shared workflow component.

Completed Tasks

  • Create /create-shared-agentic-workflow prompt file in pkg/cli/templates/
  • Embed the prompt template in pkg/cli/commands.go using go:embed
  • Add ensureSharedAgenticWorkflowPrompt function (similar to ensureAgenticWorkflowPrompt)
  • Call the function in compile and init commands
  • Apply the prompt to create a DeepWiki shared workflow in .github/workflows/shared/deepwiki-mcp.md
  • Add DeepWiki workflow to Scout workflow imports
  • Update Scout workflow to mention DeepWiki in research tools
  • Test the changes (all unit tests pass)
  • Run make agent-finish before final commit
  • Refactor prompt creation into reusable helper function

Changes

  1. New Prompt Template: pkg/cli/templates/create-shared-agentic-workflow.prompt.md

    • Comprehensive guide for creating shared workflow components
    • Emphasizes Docker/container best practices
    • Includes read-only tool patterns and safe-outputs guidance
    • Provides DeepWiki as an example
  2. Go Code Updates:

    • Added sharedAgenticWorkflowPromptTemplate embed in pkg/cli/commands.go
    • Created pkg/cli/copilot-prompts.go with ensurePromptFromTemplate helper function
    • Refactored ensureAgenticWorkflowPrompt and ensureSharedAgenticWorkflowPrompt to use the helper
    • Updated compile_command.go to call the new function
    • Updated init.go to call the new function
  3. DeepWiki Integration:

    • Created .github/workflows/shared/deepwiki-mcp.md with read-only tools
    • Updated .github/workflows/scout.md to import DeepWiki
    • Enhanced Scout's research strategy documentation

Testing

  • All unit tests pass
  • Scout workflow compiles successfully with DeepWiki integration
  • Prompt file is automatically created in .github/prompts/
  • Helper function correctly creates and updates both prompt files
Original prompt

Generate a GitHub copilot prompt file (/create-shared-agentic-workflow) that teaches best practices on wrapping a MCP server as a shared agentic workflow.

  • this prompt builds on the create-agentic-workflow
  • prefer docker solutions
  • use "container" keyword
  • support readonly tools and move write operations to safe outputs

Apply prompt to https://docs.devin.ai/work-with-devin/deepwiki-mcp to generate a shared workflow of deep wiki.

Add deep wiki to scout


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits October 7, 2025 13:23
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@pelikhan pelikhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot populate registry field as well from the github MCP registry


### Read-Only Tool Patterns

**GitHub Read-Only**:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot remove github section

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add shared agentic workflow for MCP server using Docker Add create-shared-agentic-workflow prompt and DeepWiki MCP integration Oct 7, 2025
Copilot AI requested a review from pelikhan October 7, 2025 13:47
- Introduced a new workflow to generate changeset files when a pull request is marked as ready for review.
- The workflow analyzes the PR title, description, and changes to determine the package name and change type (major, minor, patch).
- Generates a properly formatted changeset file in the `.changeset/` directory and commits it to the PR branch.

refactor: update ast-grep installation method in workflows

- Replaced manual installation of ast-grep with npm installation in both go-pattern-detector.lock.yml and shared/ast-grep.md.

fix: ensure environment variables in MCP configs are sorted alphabetically

- Modified the MCP config rendering logic to sort environment variables and headers alphabetically.
- Added a test to verify that environment variables are correctly sorted in the generated YAML output.
Comment thread pkg/cli/add_command.go
}

// ensureSharedAgenticWorkflowPrompt ensures that .github/prompts/create-shared-agentic-workflow.prompt.md contains the shared workflow creation prompt
func ensureSharedAgenticWorkflowPrompt(verbose bool, skipInstructions bool) error {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot refactor helper function to create prompts from resource and apply to create-agentic-workflow and this file. Move helper to copilot-prompts.go

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Oct 7, 2025

@copilot finish refactoring

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Oct 7, 2025

@copilot finish refactoring

Refactoring complete. Created pkg/cli/copilot-prompts.go with ensurePromptFromTemplate helper function and updated both ensureAgenticWorkflowPrompt and ensureSharedAgenticWorkflowPrompt to use it. Commit: will be included in next push.

@pelikhan pelikhan marked this pull request as ready for review October 7, 2025 14:57
@pelikhan pelikhan merged commit f726683 into main Oct 7, 2025
13 checks passed
@pelikhan pelikhan deleted the copilot/create-shared-agentic-workflow branch October 7, 2025 14:57
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.

2 participants