Skip to content

docs(config): precedence and project config discovery#36272

Draft
trevor-vaughan wants to merge 1 commit into
anomalyco:devfrom
trevor-vaughan:fix/36259-opencode-project-config
Draft

docs(config): precedence and project config discovery#36272
trevor-vaughan wants to merge 1 commit into
anomalyco:devfrom
trevor-vaughan:fix/36259-opencode-project-config

Conversation

@trevor-vaughan

@trevor-vaughan trevor-vaughan commented Jul 10, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #36259

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The config docs described project-config discovery and precedence in a way that no longer matched the code. Two fixes:

  • Rewrote the precedence list as a 9-row table so each source, how it's set, and its role line up at a glance. This also corrects the list, which was missing the organization-config layer and mislabeled a couple of sources.
  • Rewrote the "Per project" section to match how discovery actually works: OpenCode starts in the working directory and traverses up to the nearest Git root, merging every opencode.json / opencode.jsonc / .opencode/opencode.json / .opencode/opencode.jsonc it finds along the way.
  • Dropped a duplicated sentence in the merge-behavior intro.

How did you verify your code works?

Docs-only change to packages/web/src/content/docs/config.mdx. Verified the described precedence order and discovery paths against the current config-loading code, and checked the MDX renders (table formatting, tip block).

Screenshots / recordings

N/A - documentation only, no UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Jul 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

- Make the numbered precedence list easier to understand at a glance by
  changing it to a table.
- Update the traversal and target documentaiton for configuration files
  based on the current codebase

Fixes: anomalyco#36259

Signed-off-by: Trevor Vaughan <peiriannydd@gmail.com>
@trevor-vaughan trevor-vaughan force-pushed the fix/36259-opencode-project-config branch from de40711 to 343db43 Compare July 10, 2026 16:05
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.

[BUG]: opencode.json inside .opencode/ is loaded but undocumented

1 participant