Skip to content

Remove agentic-workflows guide from prompt and move reference to .github/aw - #36782

Merged
pelikhan merged 5 commits into
mainfrom
copilot/trim-agentic-workflows-guide-block
Jun 4, 2026
Merged

Remove agentic-workflows guide from prompt and move reference to .github/aw#36782
pelikhan merged 5 commits into
mainfrom
copilot/trim-agentic-workflows-guide-block

Conversation

CopilotAI commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

The agentic_workflows_guide.md (~1,628 chars) was injected into all workflows with agentic-workflows enabled, adding significant prompt overhead. This removes the file entirely and moves the full reference to a .github/aw instructions file.

Changes

  • agentic_workflows_guide.md — removed completely; the compiler no longer injects any guide into the prompt for agentic-workflows workflows
  • unified_prompt_step.go / prompts.go / prompt_constants.go — removed the guide injection block, hasAgenticWorkflowsTool helper, and the agenticWorkflowsGuideFile constant
  • .github/aw/agentic-workflows-mcp.md — new instructions file containing the full MCP tool reference (parameters and descriptions for status, logs, audit, and compile) for use by coding agents and Copilot Chat
  • All 239 workflows recompiled — the agentic_workflows_guide.md reference is gone from every lock file

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

Copy link
Copy Markdown
Collaborator

@copilot dramatically reduce size of prompt and remove the flag instead

…gating
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

CopilotAI commented Jun 4, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot dramatically reduce size of prompt and remove the flag instead

Done in 08f1009. Reverted the audit: true flag entirely and instead cut agentic_workflows_guide.md from 1,641 → 463 chars (~72% reduction) by collapsing verbose parameter lists into single-line entries and removing the section headers.

CopilotAI changed the title Gate agentic-workflows audit guide behind explicit audit: true flagReduce size of agentic-workflows guide promptJun 4, 2026

@pelikhanpelikhan left a comment

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 move most the guide to a instructions file in .github/aw (or find already one there). Keep it ultra minimalistic: use logs to find runs, use audit for deep dive in a run

…ne guide to 2 lines
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

CopilotAI commented Jun 4, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot move most the guide to a instructions file in .github/aw (or find already one there). Keep it ultra minimalistic: use logs to find runs, use audit for deep dive in a run

Done. Created .github/aw/agentic-workflows-mcp.md with the full parameter reference, and the inline guide is now just:

Use MCP tools (NOT shell commands): use `logs` to find runs, use `audit` for a deep dive into a specific run.

163 chars, down from 1,641 (90% reduction).

CopilotAI requested a review from pelikhanJune 4, 2026 01:43
#### `audit` — Inspect a specific run
- `run_id`: run ID or run/job URL (including step anchors), as string or number (alias for `run_id_or_url`)
- `run_id_or_url`: run ID or run/job URL (including step anchors), as string or number
Use MCP tools (NOT shell commands): use `logs` to find runs, use `audit` for a deep dive into a specific run.

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 add compile, status

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Added in the latest commit.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@@ -1,32 +1,3 @@
<agentic-workflows-guide>

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 this file completely, update compiler and recompile.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done. Removed agentic_workflows_guide.md, stripped the injection from the compiler (unified_prompt_step.go, prompts.go, prompt_constants.go), removed the related tests, updated the golden file, and recompiled all 239 workflows — the guide reference is now gone from every lock file.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI changed the title Reduce size of agentic-workflows guide promptRemove agentic-workflows guide from prompt and move reference to .github/awJun 4, 2026
CopilotAI requested a review from pelikhanJune 4, 2026 02:06
@pelikhan
pelikhan marked this pull request as ready for review June 4, 2026 02:07
CopilotAI review requested due to automatic review settings June 4, 2026 02:07
@pelikhan
pelikhan merged commit 9d1f5c9 into mainJun 4, 2026
@pelikhan
pelikhan deleted the copilot/trim-agentic-workflows-guide-block branch June 4, 2026 02:07

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Removes the inline agentic_workflows_guide.md prompt injection from compiled workflows to reduce prompt overhead, and introduces a .github/aw document intended to serve as the agentic-workflows MCP tool reference.

Changes:

  • Removed agentic-workflows guide prompt injection logic and deleted the guide markdown asset.
  • Added .github/aw/agentic-workflows-mcp.md as the intended replacement reference material.
  • Recompiled workflows/goldens to remove agentic_workflows_guide.md from generated prompt assembly.
Show a summary per file
FileDescription
pkg/workflow/unified_prompt_step.goRemoves agentic-workflows guide section injection from prompt section collection.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/smoke-copilot.goldenUpdates golden fixture to no longer concatenate the removed guide file.
pkg/workflow/prompts.goRemoves hasAgenticWorkflowsTool helper (no longer needed).
pkg/workflow/prompts_test.goRemoves tests that asserted guide inclusion behavior.
pkg/workflow/prompt_constants.goRemoves agenticWorkflowsGuideFile constant.
actions/setup/md/agentic_workflows_guide.mdDeletes the previously injected guide markdown file.
.github/workflows/workflow-normalizer.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/weekly-blog-post-writer.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/static-analysis-report.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/smoke-copilot.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/smoke-copilot-arm.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/smoke-codex.lock.ymlRecompiled lock file; updates prompt assembly/heredoc IDs after regeneration.
.github/workflows/smoke-claude.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/smoke-call-workflow.lock.ymlRecompiled lock file; updates prompt assembly/heredoc IDs after regeneration.
.github/workflows/security-review.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/schema-feature-coverage.lock.ymlRecompiled lock file; updates prompt assembly/heredoc IDs after regeneration.
.github/workflows/safe-output-health.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/q.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/python-data-charts.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/prompt-clustering-analysis.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/necromancer.lock.ymlRecompiled lock file; updates prompt assembly/heredoc IDs after regeneration.
.github/workflows/metrics-collector.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/mcp-inspector.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/issue-arborist.lock.ymlRecompiled lock file; updates prompt assembly/heredoc IDs after regeneration.
.github/workflows/grumpy-reviewer.lock.ymlRecompiled lock file; updates prompt assembly/heredoc IDs after regeneration.
.github/workflows/example-workflow-analyzer.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/duplicate-code-detector.lock.ymlRecompiled lock file; updates prompt assembly/heredoc IDs after regeneration.
.github/workflows/dev.lock.ymlRecompiled lock file; updates prompt assembly/heredoc IDs after regeneration.
.github/workflows/dev-hawk.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/deep-report.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/daily-security-observability.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/daily-safe-output-optimizer.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/daily-rendering-scripts-verifier.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/daily-observability-report.lock.ymlRecompiled lock file; removes guide prompt concatenation + regen IDs.
.github/workflows/daily-firewall-report.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/daily-fact.lock.ymlRecompiled lock file; updates prompt assembly/heredoc IDs after regeneration.
.github/workflows/daily-cli-tools-tester.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/daily-cache-strategy-analyzer.lock.ymlRecompiled lock file; removes guide prompt concatenation + regen IDs.
.github/workflows/daily-ambient-context-optimizer.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/daily-agentrx-trace-optimizer.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/daily-agent-of-the-day-blog-writer.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/cloclo.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/aw-failure-investigator.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/audit-workflows.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/api-consumption-report.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/agentic-token-trend-audit.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/agentic-token-audit.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/agent-persona-explorer.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/workflows/agent-performance-analyzer.lock.ymlRecompiled lock file; removes guide prompt concatenation.
.github/skills/agentic-workflows/SKILL.mdUpdates router’s referenced .github/aw files list (currently points at a missing file).
.github/aw/agentic-workflows-mcp.mdAdds the new MCP tool reference document intended to replace the removed injected guide.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (1)

pkg/workflow/prompts_test.go:634

  • The agentic-workflows guide inclusion tests were removed, but there isn't a replacement assertion covering the new behavior (guide is never injected, even when the tool is enabled). Adding a targeted regression test would prevent reintroducing prompt bloat in future refactors.
  • Files reviewed: 51/51 changed files
  • Comments generated: 5

Comment on lines 29 to 31
- `.github/aw/llms.md`
- `.github/aw/mcp-clis.md`
- `.github/aw/memory.md`
Comment on lines +15 to +16
No required parameters.

Comment on lines +29 to +32
| `firewall` / `no_firewall` | Filter by firewall status |
| `filtered_integrity` | Only runs with DIFC integrity-filtered events in gateway logs |
| `after_run_id` / `before_run_id` | Paginate by run database ID |

Comment on lines +37 to +40
| Parameter | Description |
|---|---|
| `run_id_or_url` | Run ID or run/job URL (including step anchors), as string or number |

Comment on lines +43 to +45
Recompile workflow `.md` files into `.lock.yml` files.

**MCP equivalent of**: `gh aw compile`
Sign up for freeto 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.

3 participants

@pelikhan