Skip to content

[FEATURE] Improve System Prompt to Respect AGENTS.md by Default #110

Closed

Description

@edenreich

Summary

OpenAI recently introduced [AGENTS.md](https://github.com/openai/agents.md), which is quickly becoming the de-facto standard for providing markdown-based instructions to LLMs.

To align with this standard, the system prompt should:

  1. Prefer AGENTS.md when available in the repository.
  2. Fall back to README.md if no AGENTS.md file exists.

This ensures a more consistent and efficient coding experience, since LLMs can parse structured, instruction-focused content rather than general project documentation.

Background

Previously, each LLM vendor introduced their own convention for project-specific instructions:

  • GEMINI.md for Gemini
  • QWEN.md for Qwen
  • CLAUDE.md for Claude
  • and similar vendor-specific files

This fragmented ecosystem created friction for developers and tools trying to support multiple providers. AGENTS.md consolidates these efforts into a single, vendor-agnostic format—making it easier to maintain and ensuring better interoperability.

Motivation

Currently, each LLM vendor still interprets prompts and documentation differently. Adopting AGENTS.md as the default source of truth will:

  • Encourage consistency across tools.
  • Reduce confusion caused by vendor-specific quirks.
  • Future-proof the workflow as more providers adopt the standard.

In the meantime, a vendor-aware fallback (dynamic system prompt adaptation) may be needed until adoption is universal.

Acceptance Criteria

  • If AGENTS.md is present, system prompt automatically references it.
  • If AGENTS.md is missing, system prompt falls back to README.md.
  • Optional: Vendor-specific handling for providers not yet supporting the standard.

Activity

  1. added
    enhancement
    on Aug 23, 2025
  2. edenreich commented on Aug 24, 2025

    @edenreich
    ContributorAuthor

    @claude Can you implement it?

  3. claude commented on Aug 24, 2025

    @claude
    Contributor

    Claude finished @edenreich's task —— View job • claude/issue-110-20250824-0224 • Create PR ➔


    Implementing AGENTS.md Support ✅

    I've successfully implemented the feature to prefer AGENTS.md over README.md for system prompts, aligning with OpenAI's new standard.

    Todo List:

    • Read repository guidelines and understand current implementation
    • Locate system prompt logic in codebase
    • Implement AGENTS.md preference with README.md fallback
    • Test changes with task check
    • Commit changes and provide PR link

    Changes Made:

    Updated System Prompt (config/config.go:358)

    • Changed: IMPORTANT: You NEVER read all the README.md - start by reading 300 lines
    • To: IMPORTANT: When reading project documentation, prefer AGENTS.md if available, otherwise fallback to README.md - start by reading 300 lines

    Updated Test Expectations (config/config_test.go:105)

    • Updated the test to match the new system prompt text
    • All tests now pass successfully

    Implementation Details:

    The solution addresses all acceptance criteria from the issue:

    • ✅ System prompt now references AGENTS.md as the preferred documentation source
    • ✅ Maintains backwards compatibility by falling back to README.md
    • ✅ Future-proofs the workflow for the vendor-agnostic standard

    The change is minimal and focused, updating only the system prompt instruction to align with the new AGENTS.md standard while maintaining existing functionality.

    Commit Details:

    • Commit SHA: c0cc14d86664b15d60c8aab9753c9a4889b99b56
    • Files Updated: config/config.go, config/config_test.go
    • Quality Checks: All tests, linting, and formatting checks pass ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions