Skip to content

Clarify sub-skill progressive disclosure in token/cost optimization guidance#39227

Merged
pelikhan merged 2 commits into
mainfrom
copilot/update-token-cost-optimization
Jun 14, 2026
Merged

Clarify sub-skill progressive disclosure in token/cost optimization guidance#39227
pelikhan merged 2 commits into
mainfrom
copilot/update-token-cost-optimization

Conversation

Copilot AI commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

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)

    • Added a checklist item for Sub-skills alongside existing cost levers.
    • Added explicit guidance to:
      • keep the main prompt plan-oriented,
      • move verbose formatting/playbook content into ## skill: blocks,
      • invoke skills only at the phase where they are needed (e.g., final output).
  • Cost management reference updates (docs/src/content/docs/reference/cost-management.md)

    • Expanded inline-skills section with a clear split:
      • main prompt = sequencing + decisions,
      • sub-skills = detailed templates/rubrics.
    • Added explicit “invoke late, not at startup” framing to reinforce lower token overhead.
  • Illustrative pattern

    Triage the issue and decide next action.
    
    ## skill: `report-layout`
    ---
    description: Final report format and section requirements.
    ---
    Use this only when producing the final report body.

Copilot AI and others added 2 commits June 14, 2026 15:03
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 AI requested a review from pelikhan June 14, 2026 15:06
@pelikhan pelikhan marked this pull request as ready for review June 14, 2026 15:16
Copilot AI review requested due to automatic review settings June 14, 2026 15:16
@pelikhan pelikhan merged commit 7a4c2e4 into main Jun 14, 2026
@pelikhan pelikhan deleted the copilot/update-token-cost-optimization branch June 14, 2026 15:16

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

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.json to wrap $ref in allOf.
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
@github-actions github-actions Bot mentioned this pull request Jun 15, 2026
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.

3 participants