Add AGENTS.md structured context for ORAS CLI development
This PR adds a comprehensive AGENTS.md file that provides AI coding agents with detailed instructions for working effectively in the ORAS CLI codebase. See https://agents.md .
What's Included
The instructions file provides:
Essential Development Workflow:
- Complete setup commands from fresh clone to working CLI
- Build instructions with measured timing (~15 seconds for Linux build)
- Unit test execution (~40 seconds) with expected behavior documentation
- E2E test setup requiring Docker (15-20+ minutes)
Comprehensive Validation Scenarios:
- CLI functionality testing with expected outputs
- Argument validation tests demonstrating proper error handling
- Command discovery verification
- Complete user workflow validation
Critical Timing Information:
- All commands include measured execution times
- Explicit "NEVER CANCEL" warnings for long operations with appropriate timeout values
- Buffer time included in all timeout recommendations
Known Issues Documentation:
- Go 1.25 compatibility issues with golangci-lint and covdata tools
- Expected unit test behavior (tests pass but make exits with error code 1)
- E2E test platform limitations (Linux only)
Quick Reference Section: Copy-paste ready commands for common development tasks, making it easy for agents to get started immediately.
Validation
Every single command in the instructions has been tested and verified to work correctly. The instructions follow the imperative tone requirement and start with a firm directive to "Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information."
Fixes #1819.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
@TerryHowe 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.
I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 87.27%. Comparing base (9701c46) to head (8dba878).
Additional details and impacted files
@@ Coverage Diff @@
## main #1820 +/- ##
==========================================
+ Coverage 87.23% 87.27% +0.03%
==========================================
Files 143 143
Lines 5525 5525
==========================================
+ Hits 4820 4822 +2
+ Misses 419 417 -2
Partials 286 286
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
It seems we can add more guidelines like the following examples.
Example from https://docs.github.com/en/enterprise-cloud@latest/copilot/tutorials/coding-agent/get-the-best-results#repository-wide-instructions
This is a Go based repository with a Ruby client for certain API endpoints. It is primarily responsible for ingesting metered usage for GitHub and recording that usage. Please follow these guidelines when contributing:
## Code Standards
### Required Before Each Commit
- Run `make fmt` before committing any changes to ensure proper code formatting
- This will run gofmt on all Go files to maintain consistent style
### Development Flow
- Build: `make build`
- Test: `make test`
- Full CI check: `make ci` (includes build, fmt, lint, test)
## Repository Structure
- `cmd/`: Main service entry points and executables
- `internal/`: Logic related to interactions with other GitHub services
- `lib/`: Core Go packages for billing logic
- `admin/`: Admin interface components
- `config/`: Configuration files and templates
- `docs/`: Documentation
- `proto/`: Protocol buffer definitions. Run `make proto` after making updates here.
- `ruby/`: Ruby implementation components. Updates to this folder should include incrementing this version file using semantic versioning: `ruby/lib/billing-platform/version.rb`
- `testing/`: Test helpers and fixtures
## Key Guidelines
1. Follow Go best practices and idiomatic patterns
2. Maintain existing code structure and organization
3. Use dependency injection patterns where appropriate
4. Write unit tests for new functionality. Use table-driven unit tests when possible.
5. Document public APIs and complex logic. Suggest changes to the `docs/` folder when appropriate
Example from https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/configure-custom-instructions/add-repository-instructions?tool=webui#writing-effective-repository-custom-instructions:
# Project Overview
This project is a web application that allows users to manage their tasks and to-do lists. It is built using React and Node.js, and uses MongoDB for data storage.
## Folder Structure
- `/src`: Contains the source code for the frontend.
- `/server`: Contains the source code for the Node.js backend.
- `/docs`: Contains documentation for the project, including API specifications and user guides.
## Libraries and Frameworks
- React and Tailwind CSS for the frontend.
- Node.js and Express for the backend.
- MongoDB for data storage.
## Coding Standards
- Use semicolons at the end of each statement.
- Use single quotes for strings.
- Use function based components in React.
- Use arrow functions for callbacks.
## UI guidelines
- A toggle is provided to switch between light and dark mode.
- Application should have a modern and clean design.
We might need to make some manual adjustments based on this copilot's version.
A complete redo.