Skip to content

Lazy-load Copilot agent analysis output templates - #49407

Closed
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/ambient-context-daily-optimizer-again
Closed

Lazy-load Copilot agent analysis output templates#49407
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/ambient-context-daily-optimizer-again

Conversation

Copilot AI commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

The daily ambient-context optimizer flagged copilot-agent-analysis.md as the largest sampled prompt and identified duplicated output-template scaffolding from the structured/prose experiment branches. This change keeps the experiment intact while removing the inactive variant from the initial prompt surface.

  • Prompt surface reduction

    • Replaced inline output_format variant templates in copilot-agent-analysis.md with conditional runtime imports.
    • Only the active experiment branch now loads its full report template at runtime.
  • Shared template extraction

    • Added:
      • shared/copilot-agent-analysis-structured-output.md
      • shared/copilot-agent-analysis-prose-output.md
    • Moved the existing variant-specific discussion body instructions into those shared fragments without changing their content.
  • Generated workflow sync

    • Recompiled copilot-agent-analysis.lock.yml to reflect the new prompt composition.
{{#if experiments.output_format == 'structured' }}
{{#runtime-import? shared/copilot-agent-analysis-structured-output.md}}
{{/if}}
{{#if experiments.output_format == 'prose' }}
{{#runtime-import? shared/copilot-agent-analysis-prose-output.md}}
{{/if}}

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix threat detection engine error Lazy-load Copilot agent analysis output templates Jul 31, 2026
Copilot AI requested a review from pelikhan July 31, 2026 21:54

@pelikhan pelikhan 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 use inlined skills instead and update instructions about runtime-imports which are done before execution so the current fix is not helping

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

Copilot AI commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

@copilot use inlined skills instead and update instructions about runtime-imports which are done before execution so the current fix is not helping

Addressed in eac1656.

I replaced the runtime-import? split with inline ## skill: blocks in /home/runner/work/gh-aw/gh-aw/.github/workflows/copilot-agent-analysis.md, removed the temporary shared fragments, and updated the workflow docs to state that runtime-import? resolves before the first agent turn and does not reduce the initial prompt surface.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

PR Triage

  • Category: chore (lazy-load Copilot agent analysis templates)
  • Risk: low (docs + lock file regeneration only)
  • Priority score: 30/100 (impact 15, urgency 5, quality 10)
  • Mergeable state: draft, unstable
  • Recommended action: defer - low-value, still draft

Generated by 🔧 PR Triage Agent · auto · 44.8 AIC · ⌖ 5.88 AIC · ⊞ 7.9K ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ambient-context] Daily Ambient Context Optimizer - 2026-07-31

2 participants