Clarify sub-skill progressive disclosure in token/cost optimization guidance#39227
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
Clarify sub-skill progressive disclosure in token and cost optimization guidance
Clarify sub-skill progressive disclosure in token/cost optimization guidance
Jun 14, 2026
Copilot created this pull request from a session on behalf of
pelikhan
June 14, 2026 15:06
View session
pelikhan
approved these changes
Jun 14, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR clarifies token/cost optimization guidance by framing inline ## skill: blocks as progressive disclosure: the main prompt stays plan-oriented, while detailed templates and rubrics are deferred to on-demand sub-skills to reduce ambient context and cost. It also includes a sizeable change to the embedded GitHub Actions workflow JSON schema, which appears unrelated to the stated docs-only scope.
Changes:
- Expanded cost-management guidance to explicitly split “main prompt (plan)” vs “sub-skills (detailed templates/rubrics)” and recommend invoking skills late.
- Added “Sub-skills” to the token optimization checklist and introduced a short section on pairing sub-agents with sub-skills.
- Refactored multiple event trigger schema nodes in
github-workflow.jsonto wrap$refinallOf.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/schemas/github-workflow.json |
Wrapes many trigger-related $refs in allOf, changing schema behavior/interpretation. |
docs/src/content/docs/reference/cost-management.md |
Adds explicit progressive-disclosure guidance for inline skills to reduce early-turn context. |
.github/aw/token-optimization.md |
Adds sub-skills as a token/cost lever and describes pairing sub-agents with deferred skill detail. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 3
Comment on lines
1096
to
+1102
| "branch_protection_rule": { | ||
| "$comment": "https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#branch_protection_rule", | ||
| "$ref": "#/definitions/eventObject", | ||
| "allOf": [ | ||
| { | ||
| "$ref": "#/definitions/eventObject" | ||
| } | ||
| ], |
Comment on lines
+481
to
+485
| Treat the main prompt as an execution plan and sub-skills as deferred detail: | ||
|
|
||
| - Main prompt: concise plan, sequencing, and decision points. | ||
| - Sub-skills: verbose checklists, report templates/layout rules, and domain rubrics. | ||
| - Invoke sub-skills only when needed (for example, at final report generation), not at startup. |
Comment on lines
16
to
18
| - [ ] **Sub-agents**: Delegate repetitive per-item tasks to `model: small` sub-agents (~10–20× cheaper) | ||
| - [ ] **Sub-skills**: Keep the main prompt as a short execution plan; move detailed playbooks/output layouts into `## skill:` blocks the agent invokes only when needed | ||
| - [ ] **Prompt size**: Strip redundant instructions, examples, and pleasantries from the prompt body |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates token/cost optimization guidance to explicitly treat sub-skills as progressive disclosure. The main prompt is now positioned as a compact execution plan, with detailed report-format and rubric instructions deferred to on-demand sub-skills to reduce ambient context and cost.
Token optimization guide updates (
.github/aw/token-optimization.md)## skill:blocks,Cost management reference updates (
docs/src/content/docs/reference/cost-management.md)Illustrative pattern