Compress non-deploy Copilot on Rails agent instructions - #1892
Merged
Nathan (nturinski) merged 2 commits intoSep 23, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Several edited references keep .github/agents/... link targets that don’t resolve within this repo’s resources/agents/... tree, resulting in broken in-repo cross-references.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 4
Open (4)
What changed in this PR
This PR reduces token/byte footprint of Copilot on Rails agent/reference Markdown content by compressing prose while aiming to preserve headings, code blocks, commands/paths, links, tables, and behavioral requirements, and updates the agent-asset drift baseline accordingly.
Changes:
- Compressed/rewrote prose across a large set of Copilot on Rails agent and reference Markdown files without intended behavior changes.
- Reconciled the compressed pack with current
mainguidance (including security/workflow wording updates). - Refreshed the verified agent-asset drift baseline (per PR description).
| File | Description |
|---|---|
| resources/agents/shared-references/seed-data.md | Compressed guidance around migrations/seed data and fixture/test patterns. |
| resources/agents/shared-references/runtimes/python.md | Condensed Python runtime notes and package-purpose tables. |
| resources/agents/shared-references/frontend-patterns.md | Compressed frontend architecture rules and patterns wording. |
| resources/agents/shared-references/examples/service-abstraction-examples.md | Shortened intro and clarified example notes. |
| resources/agents/shared-references/error-handling.md | Compressed standardized error-handling guidance and cross-links. |
| resources/agents/shared-references/database-integrity.md | Condensed DB constraints/transactions/index rules and examples. |
| resources/agents/azure-project-scaffold/references/sub-agent-strategy.md | Shortened backend scaffold sub-agent parallelization description. |
| resources/agents/azure-project-integrate/references/smoke-test.md | Compressed Step 2 smoke test instructions and PASS/FAIL tables. |
| resources/agents/azure-project-integrate/references/migrations.md | Condensed “schema-only” migration rules and checkpoints. |
| resources/agents/azure-project-integrate/references/end-to-end.md | Shortened end-to-end wiring verification procedure. |
| resources/agents/azure-deploy/scaffold/references/waf-checklist.md | Compressed WAF checklist phrasing while keeping per-pillar checks. |
| resources/agents/azure-deploy/scaffold/references/terraform-patterns.md | Condensed Terraform layout/provider/state/tagging/security rules. |
| resources/agents/azure-deploy/scaffold/references/subagent-review.md | Compressed subagent security/adversarial review workflow text. |
| resources/agents/azure-deploy/scaffold/references/self-review-procedure.md | Condensed Step 9 self-review workflow and prompt template. |
| resources/agents/azure-deploy/scaffold/references/self-healing.md | Shortened self-healing loop description and error table wording. |
| resources/agents/azure-deploy/scaffold/references/scaffold-healing-rules.md | Condensed scaffold healing escalation/plan-level-change rules. |
| resources/agents/azure-deploy/scaffold/references/rbac-roles.md | Compressed RBAC role guidance and delegation handoff description. |
| resources/agents/azure-deploy/scaffold/references/mcp-tools.md | Condensed scaffold-phase MCP tool reference text. |
| resources/agents/azure-deploy/scaffold/references/error-handling.md | Compressed scaffold error/remediation table rows. |
| resources/agents/azure-deploy/scaffold/references/env-var-secrets.md | Condensed env-var derivation rules and validation bullets. |
| resources/agents/azure-deploy/scaffold/references/dockerfile-generation.md | Shortened Dockerfile guidance including BuildKit/ACR constraints. |
| resources/agents/azure-deploy/scaffold/references/cicd-pipelines.md | Condensed CI/CD deferral guidance and MCP call parameters. |
| resources/agents/azure-deploy/scaffold/references/bicep-swa.md | Compressed SWA Bicep patterns, including CORS requirement. |
| resources/agents/azure-deploy/scaffold/references/bicep-patterns.md | Condensed core Bicep scaffold structure/naming constraints. |
| resources/agents/azure-deploy/scaffold/references/bicep-patterns-security.md | Shortened mandatory security defaults and no-KeyVault rules. |
| resources/agents/azure-deploy/scaffold/references/bicep-patterns-data.md | Compressed data-module pointers and context. |
| resources/agents/azure-deploy/scaffold/references/bicep-container-apps.md | Condensed Container Apps two-phase wiring and pitfalls. |
| resources/agents/azure-deploy/scaffold/references/bicep-app-service.md | Compressed App Service patterns and native-module deploy rules. |
| resources/agents/azure-deploy/references/subscription-resolution.md | Condensed defensive subscription resolution fallback sequence. |
| resources/agents/azure-deploy/references/pipeline-rules-runtime.md | Compressed known platform bugs/timing notes. |
| resources/agents/azure-deploy/references/mcp-tool-reference.md | Condensed shared MCP tool index and global parameter guidance. |
| resources/agents/azure-deploy/references/intent-gathering.md | Compressed intent gathering/scope triage guidance. |
| resources/agents/azure-deploy/references/iac-resources.md | Condensed official doc links and troubleshooting workflow. |
| resources/agents/azure-deploy/references/handoff-protocol.md | Compressed Step 9 handoff requirements and ordering. |
| resources/agents/azure-deploy/references/azd-template-routing.md | Condensed azd detection + routing gate behavior. |
| resources/agents/azure-deploy/references/approval-gates.md | Shortened scaffold/deploy approval gate contract wording. |
| resources/agents/azure-deploy/prereq/references/zero-code-path.md | Condensed empty-workspace prereq workflow and consent gates. |
| resources/agents/azure-deploy/prereq/references/subscription-resolution.md | Compressed prereq-phase subscription resolution fallback. |
| resources/agents/azure-deploy/prereq/references/subagent-starter-scaffold.md | Condensed starter scaffold subagent rules and output contract. |
| resources/agents/azure-deploy/prereq/references/remediation-protocol.md | Compressed remediation loop scope and consent gate wording. |
| resources/agents/azure-deploy/prereq/references/prereq-artifacts.md | Condensed prereq artifact write requirements and schemas. |
| resources/agents/azure-deploy/prereq/references/deployability-check.md | Compressed deployability check steps and routing notes. |
| resources/agents/azure-deploy/prereq/references/component-mapping.md | Condensed component mapping + existing infra detection steps. |
| resources/agents/azure-deploy/prereq/references/completeness-check.md | Compressed completeness checklist and severity guidance. |
| resources/agents/azure-deploy/prereq/references/cloud-sdk-migration.md | Condensed cloud-SDK classification and observability carve-out. |
| resources/agents/azure-deploy/prepare/references/validation-rubric.md | Compressed prepare validation rubric and pass criteria. |
| resources/agents/azure-deploy/prepare/references/subagent-quota.md | Condensed quota subagent rules, inputs/outputs, anti-patterns. |
| resources/agents/azure-deploy/prepare/references/subagent-pricing.md | Condensed cost estimation subagent description/token budget. |
| resources/agents/azure-deploy/prepare/references/sku-quota-validation.md | Compressed quota validation procedure and region selection rules. |
| resources/agents/azure-deploy/prepare/references/sku-matrix.md | Condensed SKU selection guidance and fast-track defaults. |
| resources/agents/azure-deploy/prepare/references/pricing-guide.md | Compressed pricing self-check and multiplier/troubleshooting rules. |
| resources/agents/azure-deploy/deploy/references/subagent-preflight.md | Condensed deploy preflight subagent procedure and checklist output. |
| resources/agents/azure-deploy/deploy/references/preflight-checks.md | Compressed deploy preflight checks and mandatory what-if guidance. |
| resources/agents/azure-deploy/deploy/references/portal-links.md | Condensed portal link generation and chat output constraints. |
| resources/agents/azure-deploy/deploy/references/mcp-tools.md | Compressed deploy-phase MCP tool contract and classification notes. |
| resources/agents/azure-deploy/deploy/references/health-check-patterns.md | Compressed health-check heuristics and placeholder detection. |
| resources/agents/azure-deploy/deploy/references/error-classification.md | Condensed deploy error classification and healing rules. |
| resources/agents/azure-deploy/deploy/references/deploy-checklist-template.md | Compressed compaction-safe checklist template guidance. |
| resources/agents/azure-deploy/deploy/references/code-deployment-swa.md | Condensed SWA CLI deploy and build pre-check instructions. |
| resources/agents/azure-deploy/deploy/references/code-deployment-appservice.md | Condensed App Service code deploy rules and zipdeploy guidance. |
| resources/agents/azure-deploy/deploy/references/approval-gate-template.md | Condensed deploy approval gate formatting and rules. |
| resources/agents/azure-deploy/deploy/instructions.md | Compressed deploy agent workflow constraints and inventory contract. |
| resources/agents/azure-debug-plan/references/runtimes.md | Condensed runtime detection notes and derived-field rules. |
| resources/agents/azure-debug-plan/references/project-types.md | Condensed project type detection and Functions dependency notes. |
| resources/agents/azure-debug-plan/references/plan-template.md | Condensed debug plan template and table-integrity requirements. |
| resources/agents/azure-debug-plan/references/multi-service.md | Compressed multi-service orchestration and dedup rules. |
| resources/agents/azure-debug-plan/references/migrations.md | Condensed migration-tool detection steps and synthesis guidance. |
| resources/agents/azure-debug-plan/references/inventory.md | Compressed inventory scan rules and autopilot prerequisite reuse. |
| resources/agents/azure-debug-plan/references/classify.md | Compressed classification procedure and service-root exclusions. |
| resources/agents/azure-debug-generate/references/runtimes/dotnet.md | Condensed .NET debug/runtime wiring notes and processName rules. |
| resources/agents/azure-debug-generate/references/project-types/frontend-spa/debug-adapters/chromium.md | Condensed Chromium adapter rules and troubleshooting guidance. |
| resources/agents/azure-debug-generate/references/project-types/frontend-spa/debug-adapters/blazorwasm.md | Condensed planned Blazor WASM adapter notes. |
| resources/agents/azure-debug-generate/references/project-types/frontend-spa/debug-adapters/_template.md | Condensed adapter template guidance. |
| resources/agents/azure-debug-generate/references/preflight.md | Compressed generation preflight checks and user-confirmed cleanup rules. |
| resources/agents/azure-debug-generate/references/migrations.md | Condensed migration-service generation patterns and resolution steps. |
| resources/agents/azure-debug-generate/references/limited-support.md | Condensed limited-support detection/emission protocol. |
| resources/agents/azure-debug-generate/references/emulators/postgres.md | Condensed Postgres emulator guidance and secret-handling cautions. |
| resources/agents/azure-debug-generate/references/emulators/azurite.md | Condensed Azurite notes and consolidation/runtime caveats. |
| resources/agents/azure-debug-generate/references/emulators/_template.md | Condensed emulator template guidance. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Reduce repeated agent-context prose while preserving structural and behavioral contracts. Refresh the validated agent asset baseline. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore the deploy router and all deploy references to main after deployment testing exposed timing and reporting risk. Refresh the validated agent asset baseline. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Nathan (nturinski)
force-pushed
the
nturinski-agent-instruction-compression
branch
from
September 22, 2026 23:39
f0388cf to
90e65bd
Compare
Matthew Fisher (MicroFish91)
approved these changes
Sep 23, 2026
Nathan (nturinski)
deleted the
nturinski-agent-instruction-compression
branch
September 23, 2026 22:28
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.

Summary
azure-deploy.agent.mdand the entireazure-deploy/**tree byte-identical tomainThe remaining files shrink from 756,445 bytes to 689,849 bytes (8.80%). No UI or documented user flow changes; no screenshots need refreshing.
Why deploy instructions are excluded
The broader experiment initially compressed all 137 files. It showed strong aggregate local efficiency, but deployment follow-up exposed operational uncertainty: the compressed orders and media samples were slower and compressed media had artifact-reporting/authentication defects. The deploy router and every prerequisite/prepare/scaffold/deploy reference are therefore restored to
mainand are not part of this PR.Clean deployment rerun
Four projects were reconstructed to their exact pre-deployment state, assigned immutable agent packs, and deployed to fresh retained Azure groups. Original arms used current
main; compressed arms used commitf44ed6ba. Deploy instruction diff between packs: 0 files.Both orders targets passed full dashboard/API/PostgreSQL/queue/worker/idempotency verification. Both media targets passed provisioning, frontend, health, CORS, identity/RBAC, keyless security, scope, and retention checks; compressed media also completed authenticated 100 MiB Blob upload and Cosmos CRUD, while original media's protected flows were correctly blocked without an interactive Entra principal. Every clean rerun used zero-delete what-if, retained all infrastructure, and recorded zero out-of-scope mutations.
The large first-run deployment gaps did not reproduce after deploy compression was removed. Absolute timing still contains different Azure/tooling outliers, so this is safety evidence—not a claim of statistical speed equivalence.
Validation
main: 0 filesEvidence limitations
Recommendation
Mergeable from a correctness/safety perspective after required human approval. Do not claim the narrowed revision is statistically proven faster until a full orders create-pipeline rerun is performed against this exact revision.