-
Notifications
You must be signed in to change notification settings - Fork 38
Convert create-agentic-workflow.prompt.md to custom agent format #2837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Created new agent template at pkg/cli/templates/create-agentic-workflow.agent.md - Agent uses proper frontmatter with 'name', 'description', and 'tools' fields - Updated init command to create agent file instead of prompt file - Init command now removes old prompt file if it exists - Updated all tests to reflect the new agent file structure - Updated documentation in init_command.go and success messages - All unit tests passing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Moved .github/prompts/create-agentic-workflow.prompt.md to .github/agents/create-agentic-workflow.agent.md - Updated Makefile sync-templates to copy agent file instead of prompt file - Removed old template file pkg/cli/templates/create-agentic-workflow.prompt.md - All tests passing with new file structure Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot format and fix tests |
- Fixed trailing whitespace in agentic_workflow_prompt_test.go - Reformatted JSON arrays in github-workflow.json schema - All tests passing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Agentic Changeset Generator triggered by this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR converts the existing create-agentic-workflow.prompt.md file to the custom agent format. The change migrates from GitHub Copilot slash commands to custom agents by converting frontmatter from prompt format to agent format and updating all related infrastructure.
- Converted frontmatter from prompt format (description, tools array as string, model) to agent format (name, description, tools array)
- Updated init command to create agent files instead of prompt files and remove old prompt files
- Modified all tests and documentation to reference the new agent file structure
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/cli/templates/create-agentic-workflow.agent.md | Converted template from prompt to agent format with proper YAML frontmatter |
| pkg/cli/init_test.go | Updated test assertions to verify agent file creation instead of prompt files |
| pkg/cli/init_command.go | Updated command description and success message to reference agent files |
| pkg/cli/init.go | Modified to remove old prompt files and create new agent files |
| pkg/cli/copilot-prompts.go | Added ensureAgentFromTemplate function for agent file management |
| pkg/cli/compile_instructions_test.go | Updated test variable names and error messages for agent files |
| pkg/cli/commands.go | Changed embedded template variable from prompt to agent |
| pkg/cli/agentic_workflow_prompt_test.go | Renamed test functions and updated to test agent functionality |
| pkg/cli/add_command.go | Modified ensureAgenticWorkflowPrompt to remove old files and added ensureAgenticWorkflowAgent |
| Makefile | Updated sync-templates rule to copy from agents directory instead of prompts |
| .github/workflows/unbloat-docs.lock.yml | Updated Node.js action version |
| .github/agents/create-agentic-workflow.agent.md | Converted agent file with proper frontmatter format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot custom agent markdown files must be under .github/agents but they do not need the .agent.md extension |
- Renamed .github/agents/create-agentic-workflow.agent.md to create-agentic-workflow.md - Renamed pkg/cli/templates/create-agentic-workflow.agent.md to create-agentic-workflow.md - Updated all references in code, tests, and Makefile - Custom agent files in .github/agents don't need .agent.md extension, just .md - Matches convention used by existing technical-doc-writer.md agent - All tests passing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in 5553402. Renamed from |
This PR updates the documentation based on features merged in the last 24 hours. ## Documentation Updates ### Custom Agent Files (PR #2838, #2837) - Added comprehensive documentation for custom agent files in the AI Engines reference - Documented the new imports-based approach for agent files - Provided migration guide from deprecated `engine.custom-agent` field - Included examples of creating and using custom agents ### Permission Validation (PR #2843) - Documented new permission validation behavior in non-strict mode - Added examples of warning messages when permissions are under-provisioned - Explained the difference between non-strict and strict mode validation - Provided actionable guidance for resolving permission warnings ### Agent File Imports (PR #2838) - Updated Imports reference to explain agent file imports - Clarified that only one agent file can be imported per workflow - Cross-referenced Custom Agent Files documentation in Engines reference ## Changes Made - Updated `docs/src/content/docs/reference/engines.md`: - Added "Custom Agent Files" section with creation and usage examples - Documented agent file requirements and constraints - Provided migration guide from `engine.custom-agent` to `imports` - Updated `docs/src/content/docs/reference/frontmatter.md`: - Added "Permission Validation" subsection under Permissions - Documented non-strict mode warning behavior - Documented strict mode error behavior - Included example warning messages - Updated `docs/src/content/docs/reference/imports.md`: - Added "Agent Files" section - Updated "Frontmatter Merging" to mention agent file fields 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Plan: Convert create-agentic-workflow.prompt.md to custom agent format
Understanding
create-agentic-workflow.prompt.mdis stored in.github/prompts/create-agentic-workflow.mdin.github/agents/description,tools, andmodelfieldsname,description, andtoolsfields.mdextension (not.agent.md)Changes Completed
pkg/cli/templates/create-agentic-workflow.mdwith proper agent frontmatter formatpkg/cli/commands.goto embed the new agent templatepkg/cli/init.goto call new function for creating agent file instead of prompt fileensureAgenticWorkflowAgentto replaceensureAgenticWorkflowPrompt.mdextension to match convention (not.agent.md)Testing
.github/agents/create-agentic-workflow.md@.github/agents/create-agentic-workflow.mdImplementation Details
The conversion involved:
description,toolsarray as string,model) to agent format (name,description,toolsarray)ensureAgentFromTemplatesimilar toensurePromptFromTemplatebut for agents directoryensureAgenticWorkflowPromptto remove old prompt files instead of creating them.github/agents/instead of.github/prompts/make fmtto ensure all code is properly formatted.mdextension to match the repository convention for custom agents (same astechnical-doc-writer.md)Original prompt
💡 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.