Skip to content

docs: update --init sample config and README for globalOverrides#33

Merged
Jercik merged 2 commits intomainfrom
docs/update-init-sample-and-readme-for-global-overrides
Apr 6, 2026
Merged

docs: update --init sample config and README for globalOverrides#33
Jercik merged 2 commits intomainfrom
docs/update-init-sample-and-readme-for-global-overrides

Conversation

@Jercik
Copy link
Copy Markdown
Owner

@Jercik Jercik commented Apr 6, 2026

Closes #30

Changes

  • SAMPLE_CONFIG in src/config/loader.ts: Added globalOverrides example with claude and codex harnesses so --init generates a config that demonstrates the feature.
  • README.md: Added OpenCode/Claude overlap note clarifying that 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.
  • Test: Updated createSampleConfig test to verify the sample includes globalOverrides, claude, and codex.

Acceptance Criteria

  • SAMPLE_CONFIG includes a globalOverrides example with at least one harness
  • README documents the globalOverrides field, lists valid harness names, and explains composition order (already present from feat: per-harness global overrides #31)
  • README notes the OpenCode/Claude compatibility fallback behavior
  • createSampleConfig test updated to verify new sample content

- 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>
github-actions[bot]

This comment was marked as resolved.

Jercik

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

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>
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary: No issues found. Clean docs/config update — SAMPLE_CONFIG now matches the README example, test coverage is appropriate, and the OpenCode note is accurate.


Code review by Claude (opus)

Comment thread src/config/loader.ts
global: ["global-rules/*.md"],
globalOverrides: {
claude: ["claude-specific/*.md"],
codex: ["codex-specific/*.md"],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ 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.

Comment thread README.md

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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ 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.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary: No issues found.


Code review by Codex CLI (gpt-5.4)

@Jercik Jercik merged commit 5d3e3ca into main Apr 6, 2026
8 checks passed
@Jercik Jercik deleted the docs/update-init-sample-and-readme-for-global-overrides branch April 6, 2026 16:29
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

🎉 This PR is included in version 5.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: update --init sample config and README for globalOverrides

1 participant