Skip to content

Auto-load nearest AGENTS.md into Mini-A runtime instructions#159

Open
Copilot wants to merge 1 commit into
mainfrom
copilot/add-reading-agents-md-automatically
Open

Auto-load nearest AGENTS.md into Mini-A runtime instructions#159
Copilot wants to merge 1 commit into
mainfrom
copilot/add-reading-agents-md-automatically

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 31, 2026

This PR adds first-class AGENTS.md ingestion so Mini-A automatically applies repository-level agent instructions without requiring rules= wiring. It aligns runtime behavior with Codex/Claude Code/OpenCode-style agent file discovery.

  • Instruction discovery and loading

    • Added upward directory traversal to resolve the nearest AGENTS.md from execution context.
    • Added runtime injection of discovered AGENTS.md content into args.rules during init().
  • Rule composition semantics

    • Preserves existing user-supplied rules and appends AGENTS-derived guidance as an additional rule block.
    • Stores source provenance (__autoagentspath) for traceability.
    • Guards against duplicate application via a one-time application flag (__autoagentsrulesapplied).
  • Core coverage updates

    • Added a core test validating nearest-parent resolution, merge behavior, and idempotency.
    • Registered the new test in tests/coreFunctionality.yaml (jobs + todo).
// new runtime behavior during init()
this._applyAutoAgentsRules(args)

// injected rule shape
"Follow AGENTS.md instructions from <resolved-path>:\n<file-content>"

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