Constrain agentic-workflows agent to single-file output#17479
Conversation
…tion prompt Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the agentic-workflows agent instructions to prevent it from generating multiple ancillary documentation files per workflow request, enforcing a single workflow .md as the main output.
Changes:
- Adds an explicit “single workflow file” constraint (with ✅/❌ examples) to the workflow-creation guidance.
- Adds a “single-file output” constraint to the dispatcher agent’s Important Notes to enforce the behavior earlier in routing.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/aw/create-agentic-workflow.md |
Adds a guideline explicitly requiring single-file workflow output and discouraging extra docs. |
.github/agents/agentic-workflows.agent.md |
Adds a dispatcher-level note to enforce single-file workflow output before loading creation prompts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - **Produce a single workflow file**: Always output exactly **one** workflow `.md` file as the primary deliverable. Do not create separate architecture documents, runbooks, usage guides, or any other documentation files alongside the workflow. | ||
| - If documentation is needed, add a brief inline `## Usage` section within the same `.md` file. | ||
| - ✅ **Correct**: One file — `.github/workflows/<workflow-id>.md` (with optional `## Usage` section inside) |
There was a problem hiding this comment.
The new “Produce a single workflow file” rule could be read as “only create one file total”, which conflicts with earlier instructions in this doc to include both the source .github/workflows/<workflow-id>.md and the compiled .github/workflows/<workflow-id>.lock.yml in the PR. Consider clarifying that the single-file constraint is about avoiding additional docs (runbooks/architecture/etc.), and that the .lock.yml is still expected.
| - **Produce a single workflow file**: Always output exactly **one** workflow `.md` file as the primary deliverable. Do not create separate architecture documents, runbooks, usage guides, or any other documentation files alongside the workflow. | |
| - If documentation is needed, add a brief inline `## Usage` section within the same `.md` file. | |
| - ✅ **Correct**: One file — `.github/workflows/<workflow-id>.md` (with optional `## Usage` section inside) | |
| - **Produce a single workflow _source_ file**: Always output exactly **one** workflow **source** `.md` file as the primary deliverable. This constraint is about avoiding additional documentation files (architecture docs, runbooks, usage guides, etc.) alongside the workflow source. | |
| - The compiled lock file **is still required** and does **not** count against this “single source file” rule. You should expect `.github/workflows/<workflow-id>.lock.yml` to be present/committed along with the source `.md`. | |
| - If documentation is needed, add a brief inline `## Usage` section within the same `.md` file. | |
| - ✅ **Correct**: One workflow source file — `.github/workflows/<workflow-id>.md` (with optional `## Usage` section inside`)`, plus its compiled `.github/workflows/<workflow-id>.lock.yml`. |
| - Workflows must be compiled to `.lock.yml` files before running in GitHub Actions | ||
| - **Bash tools are enabled by default** - Don't restrict bash commands unnecessarily since workflows are sandboxed by the AWF | ||
| - Follow security best practices: minimal permissions, explicit network access, no template injection | ||
| - **Single-file output**: When creating a workflow, produce exactly **one** workflow `.md` file. Do not create separate documentation files (architecture docs, runbooks, usage guides, etc.). If documentation is needed, add a brief `## Usage` section inside the workflow file itself. |
There was a problem hiding this comment.
This “Single-file output” note says to produce exactly one workflow .md file, but the same section also states workflows must be compiled to .lock.yml files before running. To avoid confusion (and agents skipping compilation/committing the lock), consider wording this as “no additional documentation files beyond the workflow .md (and its required .lock.yml)”.
| - **Single-file output**: When creating a workflow, produce exactly **one** workflow `.md` file. Do not create separate documentation files (architecture docs, runbooks, usage guides, etc.). If documentation is needed, add a brief `## Usage` section inside the workflow file itself. | |
| - **Single-file output**: When creating a workflow, do not create additional documentation files beyond the workflow `.md` (and its required `.lock.yml`). Avoid separate architecture docs, runbooks, usage guides, etc.; if documentation is needed, add a brief `## Usage` section inside the workflow file itself. |
The
agentic-workflowsagent was producing 3–6 documentation files per workflow request (architecture docs, runbooks, usage guides) instead of a single workflow.mdfile.Changes
.github/aw/create-agentic-workflow.md— Added explicitProduce a single workflow fileguideline to the Guidelines section with ✅/❌ examples to make the constraint unambiguous:.github/workflows/<workflow-id>.md(inline## Usagesection permitted)docs/workflow-guide.md+README-workflow.md+ architecture docs.github/agents/agentic-workflows.agent.md— AddedSingle-file outputnote to the dispatcher agent's Important Notes so the constraint is enforced at the routing layer, before the creation prompt is even loaded.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.