Repository navigation
Pack instruction contracts into the first 8,000 UTF-8 bytes - #77481
Conversation
Add UTF-8 prefix checks, update instruction and skill maintenance workflows, and compare full versus prefix-only persona guidance. Split creator guidance into bounded topic files and front-load core instruction contracts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
@copilot resolve the merge conflicts on this branch. |
There was a problem hiding this comment.
🟡 Changes recommended
The probe compares batched and single-scenario contexts, so its score delta confounds context changes with guidance truncation and cannot isolate prefix comprehension.
1 open issue
What changed in this PR
This PR makes gh-aw’s instruction entry points resilient to 8,000-byte prompt-file truncation by placing essential execution rules within the first 7,500 UTF-8 bytes.
Changes:
- Adds byte-budget validation, boundary regressions, and lint/pre-publication checks.
- Reorganizes core guidance and splits workflow creation instructions into focused references.
- Updates six maintenance/research workflows to assess prefix completeness, including a paired persona probe and a new experiment cohort.
| File | Description |
|---|---|
scripts/test_check_instruction_prefixes.py |
Tests byte limits, markers, and invalid inputs. |
scripts/check-instruction-prefixes.py |
Validates execution-contract byte budgets. |
scripts/agent-report-progress.sh |
Adds prefix validation to publication gates. |
scripts/agent-report-progress_test.sh |
Checks that prefix violations block publication. |
pkg/cli/data/agentic_workflows_skill.md |
Moves generated inventory after essential routing. |
pkg/cli/data/agentic_workflows_fallback_aw_files.json |
Registers the three new creator references. |
Makefile |
Integrates prefix checks and regression tests. |
AGENTS.md |
Compresses global rules and adds packing guidance. |
.github/workflows/workflow-skill-extractor.md |
Adds source-byte metrics and prefix-aware recommendations. |
.github/workflows/workflow-skill-extractor.lock.yml |
Regenerates extractor configuration and evaluations. |
.github/workflows/instructions-janitor.md |
Adds byte-budget and semantic-prefix audits. |
.github/workflows/instructions-janitor.lock.yml |
Regenerates janitor tools and evaluations. |
.github/workflows/evoskill-evolver.md |
Adds isolated prefix validation for skill candidates. |
.github/workflows/evoskill-evolver.lock.yml |
Regenerates skill-evolution evaluations. |
.github/workflows/daily-caveman-optimizer.md |
Prioritizes prefix completeness over prose reduction. |
.github/workflows/daily-caveman-optimizer.lock.yml |
Regenerates optimizer metadata and evaluations. |
.github/workflows/daily-ambient-context-optimizer.md |
Separates source-prefix audits from runtime measurements. |
.github/workflows/daily-ambient-context-optimizer.lock.yml |
Regenerates ambient-context evaluations. |
.github/workflows/agent-persona-explorer.md |
Adds paired prefix probes and a new experiment cohort. |
.github/workflows/agent-persona-explorer.lock.yml |
Updates experiment wiring and probe evaluations. |
.github/skills/prompt-token-efficiency/SKILL.md |
Defines byte-aware instruction packing guidance. |
.github/skills/agentic-workflows/tests/test_guidance.py |
Tests visible routes, links, and essential rules. |
.github/skills/agentic-workflows/SKILL.md |
Places task routes before the optional inventory. |
.github/aw/instructions.md |
Adds repository-specific prefix requirements. |
.github/aw/github-agentic-workflows.md |
Condenses authoring guidance and links detailed references. |
.github/aw/debug-agentic-workflow.md |
Front-loads evidence and completion requirements. |
.github/aw/create-agentic-workflow.md |
Condenses the creator into a routed execution contract. |
.github/aw/create-agentic-workflow-validation.md |
Extracts output, scope, and completion checks. |
.github/aw/create-agentic-workflow-evaluation.md |
Extracts scenario examples and failure handling. |
.github/aw/create-agentic-workflow-design.md |
Extracts workflow design decisions and safety checks. |
.github/agents/developer.instructions.md |
Front-loads development rules and verification routes. |
Review effort: Balanced (dynamic)
| Use one successfully evaluated scenario as the full-guidance baseline; request | ||
| one additional, fresh isolated `persona-evaluator` invocation with | ||
| `guidance_mode: prefix_8000` and the identical scenario. Pass no full-response | ||
| rationale or shared conversation history. Do not add a scenario or alter the four initial | ||
| baseline tasks. If none succeeded, report the probe unavailable without scores. |
|
@copilot resolve the merge conflicts on this branch. |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…density-audit # Conflicts: # .github/workflows/agent-persona-explorer.lock.yml # .github/workflows/daily-ambient-context-optimizer.lock.yml # .github/workflows/daily-caveman-optimizer.lock.yml # .github/workflows/evoskill-evolver.lock.yml # .github/workflows/instructions-janitor.lock.yml # .github/workflows/workflow-skill-extractor.lock.yml Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Merged |
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "45087f8b072009d73788740b28f3a82b5b63f6fc",
"kind": "requested",
"schema_version": "1",
"state": "e7be3ae8da17e051c139ae0696d82c4f7b071ffe78ed6dfa72d3c63dedd4691e",
"work": [
"2ec1c55a56c3bbc3d439b0f0d819e0f964a9c8ea5c8bbe45cc9676c7e7802a18"
],
"workflow": "pr-sous-chef"
}
|
|
🎉 This pull request is included in a new release. Release: |

Why
Copilot CLI prompt-file queries may expose only the first 8,000 UTF-8 bytes, including metadata. Existing entry points could lose required rules, task routing and completion checks beyond that cutoff. This change reserves the first 7,500 bytes for a complete execution contract, leaving 500 bytes of headroom.
Approach
Validation
make check-instruction-prefixes: all 15 execution contracts fit within 7,500 bytes.make recompile: all 366 workflows compiled; regenerated locks for the six modified workflows are included. No workflows were dispatched.make agent-report-progresscompleted build and script checks, then stopped on pre-existingci-front-door-researcherlock-file drift. The unrelated lock and diagnostic-code guidance were left unchanged.