Conversation
- Add globalOverrides example (claude, codex) to SAMPLE_CONFIG in loader.ts - Add OpenCode/Claude overlap caveat to README - Update createSampleConfig test to verify globalOverrides presence Closes #30 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The previous note overstated the duplication risk when configuring both claude and opencode globals. OpenCode uses ~/.claude/CLAUDE.md only as a fallback when ~/.config/opencode/AGENTS.md is absent, so no duplication occurs when both harnesses are configured. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| global: ["global-rules/*.md"], | ||
| globalOverrides: { | ||
| claude: ["claude-specific/*.md"], | ||
| codex: ["codex-specific/*.md"], |
There was a problem hiding this comment.
ℹ️ Info: Good choice mirroring the README example exactly (claude and codex with matching glob patterns). This ensures --init output stays consistent with the documented config shape.
|
|
||
| Config must specify at least one of `global`, `globalOverrides`, or `projects`. | ||
|
|
||
| > **Note:** OpenCode reads `~/.config/opencode/AGENTS.md` for global rules and falls back to `~/.claude/CLAUDE.md` only when the OpenCode-specific file is absent. If you configure both `claude` and `opencode` globals, the OpenCode file takes precedence and no duplication occurs. |
There was a problem hiding this comment.
ℹ️ Info: Verified against src/core/harness-registry.ts — OpenCode's target is ~/.config/opencode/AGENTS.md and Claude's global target is ~/.claude/CLAUDE.md, so the precedence note is accurate. The wording clearly explains the fallback behavior without requiring users to understand implementation details.
|
🎉 This PR is included in version 5.11.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #30
Changes
SAMPLE_CONFIGinsrc/config/loader.ts: AddedglobalOverridesexample withclaudeandcodexharnesses so--initgenerates a config that demonstrates the feature.~/.claude/CLAUDE.mdonly as a fallback when~/.config/opencode/AGENTS.mdis absent, so no duplication occurs when both harnesses are configured.createSampleConfigtest to verify the sample includesglobalOverrides,claude, andcodex.Acceptance Criteria
SAMPLE_CONFIGincludes aglobalOverridesexample with at least one harnessglobalOverridesfield, lists valid harness names, and explains composition order (already present from feat: per-harness global overrides #31)createSampleConfigtest updated to verify new sample content