Skip to content

Extract Design Decision Gate ADR report templates into an on-demand inline skill - #51182

Merged
pelikhan merged 2 commits into
mainfrom
copilot/daily-ambient-context-optimizer
Aug 7, 2026
Merged

Extract Design Decision Gate ADR report templates into an on-demand inline skill#51182
pelikhan merged 2 commits into
mainfrom
copilot/daily-ambient-context-optimizer

Conversation

Copilot AI commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

The Daily Ambient Context Optimizer flagged Design Decision Gate as the largest sampled first request (33,055 chars — nearly double the other sampled workflows), driven by three large <details>-heavy report templates inlined in the prompt body even though at most one is used per run.

Changes

  • .github/workflows/design-decision-gate.md
    • Moved the ADR Required (~45 lines), ADR Verified (~11 lines), and Implementation Diverges (~25 lines) templates verbatim into a single ## skill: adr-report-templates block at the end of the file.
    • Step 4a and Step 4b now point at the skill instead of carrying the template text.
  • .github/workflows/design-decision-gate.lock.yml — regenerated; single-line gh-aw-metadata body_hash update, no other lock files affected.

Inline skills are extracted at setup time by actions/setup/js/extract_inline_skills.cjs and stripped from the main prompt, so the templates are read on demand rather than shipped on every run. Mirrors the existing ## skill: test-report-templates pattern in test-quality-sentinel.md.

Before:

### Post a Blocking Comment

Post a comment using `add-comment` explaining the requirement:

```markdown
### 🏗️ Design Decision Gate — ADR Required
... ~45 lines of template ...

After:

### Post a Blocking Comment

Read the `adr-report-templates` skill and post a comment using `add-comment` with the **ADR Required** template.

Prompt body drops 14,717 → 11,467 chars (−22%), verified against the repo's own extractor. Template content is unchanged — this is pure relocation.

Scoped out

Recommendations 2–4 from the issue (shared "What to do next" fragment, extracting the generic efficiency-rules preamble, trimming the grumpy-coder / pr-triage agent blocks) are marked needs manual review and span two additional workflows' review semantics. Left for a follow-up so this stays a single verifiable change.

Note for reviewers

The issue's checklist requires "Do not submit as a draft PR," which conflicts with the standing preference to open PRs in draft. I followed the issue here — say the word if the draft convention should take precedence.

…ne skill

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Optimize daily ambient context data collection Extract Design Decision Gate ADR report templates into an on-demand inline skill Aug 7, 2026
Copilot AI requested a review from pelikhan August 7, 2026 20:22
@pelikhan
pelikhan marked this pull request as ready for review August 7, 2026 20:33
Copilot AI balanced review requested due to automatic review settings August 7, 2026 20:33
@pelikhan
pelikhan merged commit 6f72754 into main Aug 7, 2026
@pelikhan
pelikhan deleted the copilot/daily-ambient-context-optimizer branch August 7, 2026 20:33

Copilot AI 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

Extracts ADR report templates into an inline skill to reduce the Design Decision Gate’s initial prompt size.

Changes:

  • Moves three ADR comment templates into an on-demand skill.
  • Regenerates workflow metadata.
  • However, one combined skill still loads all templates per invocation.
Show a summary per file
File Description
.github/workflows/design-decision-gate.md Extracts and references ADR templates.
.github/workflows/design-decision-gate.lock.yml Updates the generated body hash.

Review details

Tip

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

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment on lines +390 to +392
## skill: `adr-report-templates`
---
description: PR comment templates for the Design Decision Gate (ADR Required, ADR Verified, and Implementation Diverges).
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.86.1

Sign up for free to 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.

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

3 participants