Skip to content

[caveman] Optimize instruction verbosity — github-mcp-server-tools.md, index-search.md (2026-11-20) - #79590

Merged
pelikhan merged 2 commits into
mainfrom
caveman/optimize-2026-11-20-d3c4bae9eb04209e
Nov 20, 2026
Merged

pelikhan merged 2 commits into
mainfrom
caveman/optimize-2026-11-20-d3c4bae9eb04209e

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Caveman Optimization Run — 2026-11-20

Applies the caveman optimization principle to instruction files:

"Why use many token when few do trick."

Two of five batch files failed scripts/check-instruction-prefixes.py (contract past byte 7,500); both now pass.

Files Optimized

File Before bytes After bytes Contract-end byte Change
.github/aw/github-mcp-server-tools.md 16898 16685 2241 Rules moved before tables
.github/aw/index-search.md 14725 13743 7209 Prose compressed; examples after marker
View Details

github-mcp-server-tools.md — Scattered mandatory notes (get_me identity rule, search_repositories repo: limitation and alternatives, list_code_scanning_alerts bounds, remote-only toolsets, feature-flagged issue tools, copilot/governance/projects permission gates, remote-schema caveat) are consolidated into a ## Rules section plus a toolset index before <!-- instruction-prefix-end -->. Duplicate in-table notes were removed; all tool tables are unchanged (the ### copilot table parsed by permissions_validator_json_test.go is intact).

index-search.md — Tightened prose in publisher model, trust boundaries, and cache contract sections (~980 bytes) so every security rule ends by byte 7,209; both aw/yaml examples follow the marker unchanged.

Batch files needing no change: github-mcp-server-pagination.md (2737 B), github-mcp-server.md (5927 B), harbor.md (contract 7187/7500).

What Was Preserved

All technical accuracy, field names, examples, schema definitions, and security rules were kept intact.

Validation

  • make check-instruction-prefixes and check-instruction-prefixes.py on the batch: pass.
  • Go tests could not run in the sandbox (toolchain download blocked); the copilot-table parse used by permissions_validator_json_test.go was replicated in Python and matches all 14 tools.

Round-Robin Progress

Processed files 27–31 of 79 total files in the queue.

🤖 Generated with [Claude Code]((claude.com/redacted)

Generated by ⚡ Daily Caveman Optimizer · claude · haiku45 · ~84 AIC · ⌖ ~47 AIC · ⊞ 4.5K · ◷

  • expires on Nov 23, 2026, 12:49 PM UTC-08:00

github-mcp-server-tools.md and index-search.md exceeded the prefix contract;
rules and trust boundaries now precede reference tables and examples.

Co-Authored-By: Claude <[email protected]>

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.

🟡 Changes recommended

An active documentation issue remains because the new marker does not explain how to load the matching toolset section, so prefix-limited queries can omit required tool contracts.

1 open issue
What changed in this PR

Optimizes two GitHub Agentic Workflow instruction files by compressing prose and moving mandatory MCP, indexing, cache, and security guidance into the visible prefix while preserving the underlying contracts.

Changes:

  • Consolidated GitHub MCP tool restrictions, permissions, feature flags, and remote-mode requirements before the prefix marker.
  • Compressed indexing, trust-boundary, cache, and restoration guidance in index-search.md.
  • Moved extended reference tables and examples after the contract markers and verified both files with check-instruction-prefixes.py.
File Description
.github/​aw/​index-search.md Compresses indexing, trust-boundary, cache, and restoration guidance while keeping the required contract within the visible prefix.
.github/​aw/​github-mcp-server-tools.md Front-loads MCP identity, permission, feature-flag, remote-mode, and tool-specific rules while retaining the complete tool reference tables.

Review effort: Lite (adaptive)

- **Permissions**: `copilot` requires `issues` and `pull-requests` write permissions, including its read-only Automation and task-status tools. `governance` org/enterprise operations need suitable token access; enabling the toolset does not grant it. `projects` requires a PAT — not supported by `GITHUB_TOKEN`.
- **Remote schema**: `copilot` Automation/task-status parameters are defined by the remote GitHub MCP service; their placement under `copilot` is not confirmed against public upstream toolset registration.

Toolsets: `context`, `code_quality`, `copilot`, `copilot_issue_intents`, `copilot_spaces`, `repos`, `git`, `github_support_docs_search`, `governance`, `issues`, `pull_requests`, `actions`, `code_security`, `dependabot`, `discussions`, `gists`, `labels`, `notifications`, `orgs`, `projects`, `secret_protection`, `security_advisories`, `stargazers`, `users`.

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.

Added a pre-marker instruction to load the matching ### <toolset> section for tool and parameter contracts. Commit: e20b7fc9.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (.github/aw/github-mcp-server-tools.md:19): address unresolved feedback - Review comment

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "656a67c3d28101fc2509ed36a4f53d98aa8ea2f2",
  "kind": "requested",
  "schema_version": "1",
  "state": "899113e64df84e80a139bec718971ca7622169a36ce72c24251a4f984dac7e07",
  "work": [
    "1432cb30f169dea298194426a670d73c5c45b9a2f08310a587fd81c538707e95"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 7K · ◷
Comment /souschef to run again

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Copilot AI requested a review from gh-aw-bot November 20, 2026 21:41
@pelikhan
pelikhan merged commit fa7e90d into main Nov 20, 2026
20 checks passed
@pelikhan
pelikhan deleted the caveman/optimize-2026-11-20-d3c4bae9eb04209e branch November 20, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation documentation Improvements or additions to documentation prompt-quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants