Add resolved workflow manifest to lock file comments for workflows with imports#1253
Merged
Merged
Conversation
…flows with imports Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add full manifest of resolved workflow spec in top-file comments
Add resolved workflow manifest to lock file comments for workflows with imports
Oct 6, 2025
pelikhan
approved these changes
Oct 6, 2025
Collaborator
|
@copilot merge main. format, lint, recompile |
Copilot stopped work on behalf of
pelikhan due to an error
October 6, 2025 16:16
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
When compiling agentic workflows that use imports or includes, the compiled
.lock.ymlfiles now include a "Resolved workflow manifest" comment section in the header that documents all dependencies. This provides clear visibility into what files were merged into the final workflow configuration.Problem
Previously, when a workflow used the
imports:frontmatter field or@includedirectives to compose functionality from multiple files, the compiled.lock.ymlfile provided no indication of these dependencies. This made it difficult to understand:Solution
The compiler now tracks all imported and included files during the compilation process and writes them as comments in the lock file header:
Before:
After:
Implementation Details
Parser Changes (
pkg/parser/frontmatter.go)ProcessImportsFromFrontmatterWithManifest()function that returns the list of imported files along with merged tools and enginesExpandIncludesWithManifest()function that returns the list of included files along with expanded contentCompiler Changes (
pkg/workflow/compiler.go)ImportedFilesandIncludedFilesfields toWorkflowDatastructgenerateYAML()to output the manifest section when imports or includes are presentTest Coverage
Added comprehensive test suite in
pkg/workflow/manifest_test.gocovering:All existing tests continue to pass, confirming backward compatibility.
Benefits
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.