Extract inline output templates from daily-cache-strategy-analyzer into shared file - #49861
Conversation
…hared file Move the inline issue and discussion template blocks out of the workflow body into `.github/aw/cache-strategy-templates.md`. The workflow now references that file with a short read-on-demand instruction, reducing the first-request prompt size by ~2,875 chars (18.7%). - New: .github/aw/cache-strategy-templates.md - Updated: .github/workflows/daily-cache-strategy-analyzer.md (15337 → 12462 chars) - Updated: .github/workflows/daily-cache-strategy-analyzer.lock.yml (recompiled) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot update ambient context optimizer and token optimization instructions to recommend inlined skills to delay load prompt instructions |
…gy templates Replace `.github/aw/cache-strategy-templates.md` with two inline skill blocks (`## skill:`) at the end of the workflow. The gh-aw runtime extracts inline skills before the main prompt runs, so template content is available on demand without inflating the initial request context. - Removed: .github/aw/cache-strategy-templates.md - Updated: daily-cache-strategy-analyzer.md — added cache-strategy-issue-template and cache-strategy-discussion-template inline skill blocks; updated Phase 5/6 instructions to reference skills by name - Updated: daily-cache-strategy-analyzer.lock.yml (recompiled) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done. Replaced the separate |
Update token-optimization.md and daily-ambient-context-optimizer.md to recommend ## skill: blocks as a technique for delaying large output templates, formatting rubrics, and phase-specific playbooks out of the initial request context. - token-optimization.md: expand Quick-Reference "Sub-skills" checklist item to explicitly mention inline ## skill: blocks and delayed loading; add Technique 3b covering when/how to use inline skills, pattern example, and scoping guidance - daily-ambient-context-optimizer.md: add detection of large inline output templates as a Source Review signal; add priority 6 to Recommendation Rules to suggest moving templates to ## skill: blocks - daily-ambient-context-optimizer.lock.yml: recompiled Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done. Two files updated:
|
There was a problem hiding this comment.
Pull request overview
Reduces the cache analyzer’s initial prompt by moving output templates into on-demand inline skills.
Changes:
- Converts issue and discussion templates into inline skills.
- Updates optimizer guidance and token-optimization documentation.
- Recompiles affected workflow lock files.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/daily-cache-strategy-analyzer.md |
Adds on-demand template skills. |
.github/workflows/daily-cache-strategy-analyzer.lock.yml |
Recompiled analyzer workflow. |
.github/workflows/daily-ambient-context-optimizer.md |
Recommends inline template skills. |
.github/workflows/daily-ambient-context-optimizer.lock.yml |
Recompiled optimizer workflow. |
.github/aw/token-optimization.md |
Documents delayed instruction loading. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 5/5 changed files
- Comments generated: 3
- Review effort level: Balanced
| ```markdown | ||
| ### Finding: <title> | ||
|
|
||
| **Severity**: ... | ||
|
|
||
| ...full template... | ||
| ``` |
| - ✅ Creates a discussion summarizing all findings | ||
| - ✅ Avoids duplicate issues by checking `known-issues.json` | ||
|
|
||
| ## skill: `cache-strategy-issue-template` |
| 3. simplify or remove low-value inline agents | ||
| 4. move deterministic data gathering out of the main prompt | ||
| 5. enable `gh-proxy` and `cli-proxy` when missing, then rewrite raw CLI-oriented problem wording to explicit `agentic-workflows` MCP-tool calls | ||
| 6. move large inline output templates (issue body, discussion body, report formats) into `## skill:` blocks so they are loaded on demand rather than unconditionally inflating the first request |
|
@copilot Please take a quick pass on the remaining PR hygiene items, then run the Notes to check before merging:
If everything still looks good after refresh, please wrap up with the
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
🎉 This pull request is included in a new release. Release: |
The Phase 5 (issue body) and Phase 6 (discussion body) template blocks were unconditionally loaded into every run's initial prompt, inflating first-request context by ~3.5 KB even when no findings existed.
Changes
.github/aw/cache-strategy-templates.md— shared file containing the full issue and discussion body templates, organized under## Issue Templateand## Discussion Templatesectionsdaily-cache-strategy-analyzer.md— replaced both inline template blocks with single-line read-on-demand references; the agent reads the templates file only when it is about to create outputRead the issue template from
.github/aw/cache-strategy-templates.md(see "## Issue Template" section) immediately before creating each issue.