Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 2, 2026

AGENTS.md consumed ~9KB with excessive detail that constrained project evolution and wasted token budget. Reduced to 7KB (24% smaller) by making structure more generic while preserving essential agent context.

Changes

Project Structure

  • Grouped folders (.github/agents/, .github/workflows/, .github/ISSUE_TEMPLATE/) instead of enumerating every file
  • Removed individual source/test file listings - kept only directory structure
  • Retained only critical root-level configuration files

Development Guidelines

  • Removed test file breakdown (ProgramTests.cs, IntegrationTests.cs, Runner.cs)
  • Consolidated code standards without losing essential requirements
  • Made workflow structure generic (no specific YAML file names)
  • Simplified quality checks and technology listings

Agent Instructions & Common Tasks

  • Streamlined to principles rather than implementation specifics
  • Removed overly detailed workflow modification steps
  • Made dependency and framework update guidance generic

Impact

  • File size: 9,304 → 7,043 bytes
  • Lines: 240 → 197
  • Future file additions won't require AGENTS.md updates
Original prompt

The AGENTS.md is around 9 kilobytes, which eats into the LLM token length with superfluous details not needed by agents; and in fact may lock the project into being too rigid.

Consider slimming down the AGENTS.md a little bit, and being slightly more generic. For example the project structure essentially mentions every file in the repository, making it somewhat harder to add new files - instead for some folders such as .github/agents, .github/workflows, etc. it could just mention the folder as containing agents and workflows. Some files (especially those at the root) may be important enough to mention explicitly.

Look for other simplifications that would still make a useful AGENTS.md for maintaining the project, but would give enough flexibility for growth.

Custom agent used: Documentation Writer
Expert technical writer for maintaining documentation, XML comments, and ensuring documentation quality


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Jan 2, 2026
Copilot AI changed the title [WIP] Refactor AGENTS.md for improved flexibility and clarity Slim down AGENTS.md to reduce LLM token consumption Jan 2, 2026
Copilot AI requested a review from Malcolmnixon January 2, 2026 12:34
@Malcolmnixon Malcolmnixon marked this pull request as ready for review January 2, 2026 12:36
@Malcolmnixon Malcolmnixon merged commit 105216b into main Jan 2, 2026
8 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/simplify-agents-md-file branch January 2, 2026 12:38
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.

2 participants