Skip to content

Commit a2cf029

Browse files
Merge branch 'main' into copilot/fix-retry-loop-token-drain
2 parents 3057d3a + 4ee14ca commit a2cf029

283 files changed

Lines changed: 6896 additions & 124 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/patch-fix-aic-usage-cache.md

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/aw/campaign.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ First-class output is a **metric** and an **interpretation**. Make KPI computati
122122

123123
### Cross-repo coordination
124124

125-
- `safe-outputs.dispatch-workflow` is same-repo only.
125+
- `safe-outputs.dispatch-workflow` is same-repo by default; cross-repo dispatch needs `target-repo` plus an `allowed-repos` allowlist and a token with `actions: write` on the target.
126126
- For org-wide/multi-org, use a coordinator sending `repository_dispatch` to each target repo.
127127
- Requires PAT or GitHub App token with access to every dispatched repo.
128128
- Prefer fine-grained PAT scoped to specific repos with `Actions: Read & Write`.

.github/aw/safe-outputs-automation.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,12 @@ description: Safe-output reference for workflow dispatch, code scanning, checks,
6868
dispatch-workflow:
6969
workflows: [workflow-name] # Required: list of workflow names to allow
7070
max: 3 # Optional: max dispatches (default: 1, max: 3)
71+
target-repo: org/other-repo # Optional: cross-repo dispatch target (owner/repo or expression)
72+
allowed-repos: [org/*] # Optional: allowlist for cross-repo dispatch targets
73+
target-ref: main # Optional: ref to dispatch against (overrides caller's GITHUB_REF)
7174
```
7275

73-
Triggers other agentic workflows in the same repository using workflow_dispatch. Agent output includes `workflow_name` (without .md extension) and optional `inputs` (key-value pairs). Not supported for cross-repository operations.
76+
Triggers other agentic workflows using workflow_dispatch. Agent output includes `workflow_name` (without .md extension) and optional `inputs` (key-value pairs). Cross-repo dispatch is supported via `target-repo` plus an `allowed-repos` allowlist; cross-repo targets require a token with `actions: write` on the target repository.
7477
- `dispatch_repository:` - Dispatch `repository_dispatch` events to external repositories (experimental)
7578

7679
```yaml

.github/aw/safe-outputs-content.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ description: Safe-output reference for issue, discussion, comment, and pull requ
125125
required-title-prefix: "[bot]" # Optional: issue/PR title must start with this prefix
126126
hide-older-comments: true # Optional: minimize previous comments from same workflow
127127
allowed-reasons: [outdated] # Optional: restrict hiding reasons (default: outdated)
128-
discussions: true # Optional: set false to exclude discussions:write permission (default: true)
128+
discussions: true # Optional: opt-in to discussions:write permission for discussion comments/replies (default: false)
129129
issues: true # Optional: set false to exclude issues:write permission (default: true)
130130
pull-requests: true # Optional: set false to exclude pull-requests:write permission (default: true)
131131
footer: true # Optional: when false, omits visible footer but preserves XML markers (default: true)

.github/aw/token-optimization.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Apply these in order — each check can halve costs:
1414
- [ ] **gh-proxy**: Set `tools.github.mode: gh-proxy` — skips Docker MCP server startup and extra tool definitions
1515
- [ ] **cli-proxy**: Mount additional MCP servers as CLIs via `cli-proxy: true` — agent pipes output through `jq` before it enters context
1616
- [ ] **Sub-agents**: Delegate repetitive per-item tasks to `model: small` sub-agents (~10–20× cheaper)
17+
- [ ] **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
1718
- [ ] **Prompt size**: Strip redundant instructions, examples, and pleasantries from the prompt body
1819
- [ ] **Dynamic context**: Inject only required fields — `${{ github.event.issue.number }}` not the full event payload
1920
- [ ] **Pull context on demand**: query logs/data only after a hypothesis forms; avoid preloading large raw dumps into the initial prompt
@@ -264,6 +265,16 @@ Nothing else.
264265

265266
**Why this saves tokens:** sub-agents run on the cheap `small` model; the main agent only reads compact `{"number":…, "category":…}` JSON; sub-agent dispatches can run in parallel.
266267

268+
### Pair sub-agents with sub-skills (progressive disclosure)
269+
270+
Use sub-skills as progressive disclosure for instruction-heavy tasks:
271+
272+
- Keep the main prompt short and plan-like (what to do, in what order).
273+
- Put verbose instructions (report layout, rubric details, long formatting constraints) into `## skill:` blocks.
274+
- Invoke those skills only at the moment they are needed (for example, when producing final output), so early planning/execution turns stay lean.
275+
276+
This pattern lowers ambient context and usually improves both latency and AIC by delaying expensive instruction payloads until the final phase.
277+
267278
**Sub-agent model aliases:**
268279

269280
| Alias | Use when |

.github/workflows/ab-testing-advisor.lock.yml

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/ace-editor.lock.yml

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/agent-performance-analyzer.lock.yml

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/agent-persona-explorer.lock.yml

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/agentic-token-audit.lock.yml

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)