Skip to content

docs: name tools/ as the canonical custom-tools directory - #41952

Open
andyst-dev wants to merge 1 commit into
anomalyco:devfrom
andyst-dev:fix/docs-tools-canonical-dir
Open

docs: name tools/ as the canonical custom-tools directory#41952
andyst-dev wants to merge 1 commit into
anomalyco:devfrom
andyst-dev:fix/docs-tools-canonical-dir

Conversation

@andyst-dev

Copy link
Copy Markdown

Fixes #41925

What Problem This Solves

custom-tools.md documented only .opencode/tools/ and ~/.config/opencode/tools/, but the loader globs {tool,tools} (registry.ts), so the singular tool/ is loaded too. The documented contract was narrower than the implemented one: someone who guesses tool/ gets working behavior no page promises, and docs/lint/scaffold tooling treats tool/ as wrong when the loader accepts it.

Why This Change Was Made

Name tools/ as the canonical directory and state that the singular tool/ is accepted for backwards compatibility — matching the convention already documented in config.mdx. This resolves the ambiguity without changing loader behavior (both spellings remain valid).

Evidence

Doc-only change. Verified the loader glob in packages/opencode/src/tool/registry.ts:180 (Glob.scanSync("{tool,tools}/*.{js,ts}")) and the existing plural-canonical note in config.mdx.

custom-tools.md only documented .opencode/tools/ and ~/.config/opencode/tools/,
but the loader globs {tool,tools}, so the singular tool/ is loaded too. State
explicitly that tools/ is canonical and that tool/ is accepted for backwards
compatibility, matching the convention already documented in config.mdx.
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Aug 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:compliance This means the issue will auto-close after 2 hours.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: custom-tools says tools/ but the loader globs {tool,tools} — name one canonical directory

1 participant