Add explicit engine.agent field for Copilot CLI agent specification#12798
Merged
Add explicit engine.agent field for Copilot CLI agent specification#12798
engine.agent field for Copilot CLI agent specification#12798Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
🔍 PR Triage ResultsCategory: feature | Risk: low | Priority: 45/100 Scores Breakdown
📋 Recommended Action: BATCH REVIEWThis PR is suitable for batch review with similar PRs. Consider grouping with other feature PRs for efficient processing. Triaged by PR Triage Agent on 2026-01-30
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add frontmatter field to specify agent id
Add explicit Jan 30, 2026
engine.agent field, remove automatic agent inference from imports
Contributor
|
@copilot update main json schema |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Contributor
|
@copilot the engine.agentic and tbe agent import at separate orthogonal features |
Both features are now supported as separate orthogonal ways to specify agent: 1. engine.agent - explicit agent ID (takes priority when both specified) 2. Agent imports - importing .github/agents/*.md files (auto-detected) This restores the original agent import detection that was incorrectly removed. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Fixed in commit ebc9268. Both features are now orthogonal:
The agent import detection code has been restored. Both methods work independently, with |
Copilot
AI
changed the title
Add explicit
Add explicit Jan 30, 2026
engine.agent field, remove automatic agent inference from importsengine.agent field as orthogonal feature to agent imports
Contributor
|
@copilot --agent only controlled by engine.agent |
Agent imports now only import markdown content and do NOT set the --agent flag. The --agent flag is exclusively controlled by the engine.agent field. Updated workflows to explicitly specify engine.agent since imports no longer set the flag. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Copilot
AI
changed the title
Add explicit
Add explicit Jan 31, 2026
engine.agent field as orthogonal feature to agent importsengine.agent field for Copilot CLI agent specification
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary: Add
engine.agentfrontmatter fieldSuccessfully implemented the ability to explicitly specify the agent ID via
engine.agentfrontmatter field, which is passed to the Copilot CLI--agentflag. The--agentflag is exclusively controlled byengine.agent. Agent imports remain functional as a separate orthogonal feature for importing markdown content.✅ All Requirements Met
engine.agent = agentid--agentflag exclusively controlled byengine.agentengine.agentImplementation Details
Core Changes
pkg/workflow/engine.go: AddedAgent stringfield toEngineConfigstructpkg/workflow/engine.go: UpdatedExtractEngineConfig()to parseengine.agentfrom frontmatterpkg/workflow/copilot_engine_execution.go:--agentflag only set byengine.agentpkg/parser/import_processor.go: Agent imports still work for importing markdown content (AgentFile field populated)pkg/parser/schemas/main_workflow_schema.json: Addedagentfield to engine configuration schemadocs/src/content/docs/reference/frontmatter-full.md: Regenerated documentation to includeagentfieldTest Updates
TestCopilotEngineWithAgentFromEngineConfig- validatesengine.agentsets --agent flagTestCopilotEngineWithAgentFromImports- validates agent imports do NOT set --agent flagTestCopilotEngineAgentOnlyFromEngineConfig- validates onlyengine.agentcontrols the flagTestAgentImportWithToolsArray- validates agent import detection still worksTestMultipleAgentImportsError- validates error on multiple agent importsMigrated Workflows
Updated 3 workflows to explicitly use
engine.agent:glossary-maintainer.md→engine.agent: technical-doc-writerhourly-ci-cleaner.md→engine.agent: ci-cleanertechnical-doc-writer.md→engine.agent: technical-doc-writerFeature Clarification: Two Orthogonal Features
1.
engine.agent- Controls--agentFlag (New)2. Agent Imports - Import Markdown Content (Existing)
Key Point: These are orthogonal features:
engine.agentexclusively controls the--agentflag passed to Copilot CLI.github/agents/files--agentflagUsage Examples
Using
engine.agentwith agent importUsing
engine.agentwithout importsUsing agent import without
engine.agentMigration Required
--agentflag must add explicitengine.agent:Validation Status
✅ All checks passing:
Notes
--agentflag is exclusively controlled byengine.agentAgentFilefield still populated from imports (for other engine types like Claude/Codex that use agent content differently)engine.agent) and agent content (imports)Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.