refactor(init): tighten AGENTS guidance (#20422)

This commit is contained in:
Shoubhit Dash 2026-04-01 21:37:25 +05:30 committed by GitHub
parent 0a125e5d4d
commit 897d83c589
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 75 additions and 11 deletions

View file

@ -15,9 +15,17 @@ To create a new `AGENTS.md` file, you can run the `/init` command in opencode.
You should commit your project's `AGENTS.md` file to Git.
:::
This will scan your project and all its contents to understand what the project is about and generate an `AGENTS.md` file with it. This helps opencode to navigate the project better.
`/init` scans the important files in your repo, may ask a couple of targeted questions when the codebase cannot answer them, and then creates or updates `AGENTS.md` with concise project-specific guidance.
If you have an existing `AGENTS.md` file, this will try to add to it.
It focuses on the things future agent sessions are most likely to need:
- build, lint, and test commands
- command order and focused verification steps when they matter
- architecture and repo structure that are not obvious from filenames alone
- project-specific conventions, setup quirks, and operational gotchas
- references to existing instruction sources like Cursor or Copilot rules
If you already have an `AGENTS.md`, `/init` will improve it in place instead of blindly replacing it.
---

View file

@ -153,7 +153,7 @@ Show the help dialog.
### init
Create or update `AGENTS.md` file. [Learn more](/docs/rules).
Guided setup for creating or updating `AGENTS.md`. [Learn more](/docs/rules).
```bash frame="none"
/init