framework
Copilot instructions532 starsChanged 4 years agoMITView on GitHub
This file provides rules for GitHub Copilot when reviewing pull requests in goravel/framework. See .agents/prompts/tests.md for the full testing guidelines.
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,336 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this copilot-instructions.md into the rules it gives an agent
5 rules. About 1 is common, 0 are distinctive, and 4 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 7
Use any instead of interface{}.
- Very specific: line 8
Do not shadow the built-in error type, the standard-library errors package, or common variable names (err, ctx, etc.).
- Very specific: line 9
Import order: standard library → third-party → internal (github.com/goravel/framework/...), separated by blank lines.
- Very specific: line 15
Use format verbs in error messages and supply dynamic parts via .Args(...) — never interpolate directly into the New string.
- Common: line 16
Do not swallow errors silently.
≈ “Common” is an estimate: at least 1 in 5 of the 3,779 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub Copilot Instructions
This file provides rules for GitHub Copilot when reviewing pull requests in goravel/framework.
Go Code Style
- Use
anyinstead ofinterface{}. - Do not shadow the built-in
errortype, the standard-libraryerrorspackage, or common variable names (err,ctx, etc.). - Import order: standard library → third-party → internal (
github.com/goravel/framework/...), separated by blank lines.
Error Handling
- Never create errors inline in logic. All errors — including one-off messages — must be declared as named variables in
errors/list.gousing the framework error constructor:github.com/goravel/framework/errors.New(...)(or unqualifiedNew(...)when insidepackage errors). This applies to every package; do not usefmt.Errorf,errors.New, or any stdlib error constructor at the call site. Errors are centralised inerrors/list.goto support future i18n. - Tag errors with a module via
.SetModule(errors.ModuleXxx)when returning from a service provider or internal package. - Use format verbs in error messages and supply dynamic parts via
.Args(...)— never interpolate directly into theNewstring. - Do not swallow errors silently; log or propagate them.
Testing
See .agents/prompts/tests.md for the full testing guidelines.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

