Skip to content

chore: add CodeRabbit config and make AGENTS.md canonical - #21

Merged
tier940 merged 2 commits into
mainfrom
chore/coderabbit
Aug 6, 2026
Merged

chore: add CodeRabbit config and make AGENTS.md canonical#21
tier940 merged 2 commits into
mainfrom
chore/coderabbit

Conversation

@tier940

@tier940 tier940 commented Aug 6, 2026

Copy link
Copy Markdown
Member

Successor to the removed Gemini Code Assist / Claude PR review setups.

.coderabbit.yaml

  • knowledge_base.mcp.usage: enabled — the default auto disables MCP for public repositories, which would stop the DeepWiki MCP server from being used as review context.
  • reviews.path_instructions — this repo is a GregTech CE: Unofficial add-on, so the reviewer is told to verify GTCEu API/registry usage against DeepWiki (GregTechCEu/GregTech), respect the 1.12.2/Java 8 platform, check the module-system (@GTEModule) and mixin conventions, and confirm optional integrations (Gendustry, Binnie's Mods, GTFO, TOP) are gated.

AGENTS.md / CLAUDE.md

CLAUDE.md (previously untracked/staged content) is renamed to AGENTS.md and CLAUDE.md becomes a symlink to it — matching Claude Code's own documented pattern (ln -s AGENTS.md CLAUDE.md) and letting CodeRabbit read the real content regardless of whether it follows the symlink or reads the git blob directly (confirmed via testing on BetterLinkPartyClaim#8 that CodeRabbit does follow it, but this makes the setup robust either way).

The opening line was changed from "This file provides guidance to Claude Code (claude.ai/code)..." to a tool-neutral phrasing, since AGENTS.md is read by multiple tools (Claude Code, Codex, CodeRabbit), not just Claude Code.

Only these 3 files are included in this PR — the branch also carries unrelated in-progress work (module system refactor, .serena/ memory files, .mcp.json) that is intentionally left untouched/uncommitted.

Note: origin was temporarily switched from HTTPS to SSH to push this branch, matching the other repos in the org.

Summary by CodeRabbit

  • Documentation

    • Added repository guidance covering project structure, build and test workflows, coding conventions, integrations, and debugging.
    • Added compatibility and integration guidance for Java and Minecraft development.
    • Added a linked reference so the same guidance is available through multiple assistant instruction files.
  • Chores

    • Added automated review configuration with project-specific context and validation instructions.

Successor to the removed Gemini Code Assist / Claude PR review setups.

- knowledge_base.mcp.usage: enabled - 'auto' disables MCP for public
  repositories, which would prevent the DeepWiki MCP server from being
  used as review context.
- reviews.path_instructions: give the reviewer the GTCEu context it needs
  (this repo is a GregTech CE: Unofficial add-on), plus the module system
  and mixin conventions specific to this repo.

Also make AGENTS.md the canonical file: CLAUDE.md is now a symlink to it,
matching Claude Code's own documented pattern (ln -s AGENTS.md CLAUDE.md)
and letting CodeRabbit's AGENTS.md/CLAUDE.md auto-detection pick up the
real content either way.
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request adds CodeRabbit review configuration, repository guidance for AI coding agents, and a symbolic link from CLAUDE.md to AGENTS.md.

Changes

Repository guidance

Layer / File(s) Summary
CodeRabbit review configuration
.coderabbit.yaml
Configures MCP usage and Java review checks for GTCEu APIs, compatibility, side safety, modules, mixins, integrations, and build files.
Agent guidance and shared entry point
AGENTS.md, CLAUDE.md
Documents repository architecture, commands, conventions, configuration, integrations, and debug settings. CLAUDE.md links to AGENTS.md.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the two main changes: adding CodeRabbit configuration and making AGENTS.md canonical.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/coderabbit

Comment @coderabbitai help to get the list of available commands.

Unlike GTExpert-Core, this repo has no IClassTransformer/ASM bytecode
rewriting — ModuleManager uses Forge's ASMDataTable annotation scanning
only, which is a safe, standard Forge mechanism. State this explicitly so
the reviewer does not conflate it with the riskier bytecode-transformer
pattern used elsewhere in the org's repos.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.coderabbit.yaml:
- Around line 32-38: Align the module guidance in .coderabbit.yaml lines 32-38
and AGENTS.md lines 46-52 and 63 with the current contract: reference
ModuleManager at
src/main/java/com/github/gtexpert/gtbm/module/ModuleManager.java; state that
Forge ASMDataTable scans `@TModule` and `@ModuleContainer` and discovery does not
use IClassTransformer; replace BaseGTEModule/GTEModules with BaseModule/Modules,
noting that Modules is manually registered by GTBMMod; and state that modules
implement IModule, integration modules extend GTBMIntegrationSubmodule, and
TModule.modDependencies lists required mod IDs.

In `@AGENTS.md`:
- Line 67: Remove the stale CoreMod entry from the documentation and update the
corresponding CoreModule description to identify it as a module, not an FML
loading plugin; do not reference the nonexistent GTECoreMod or ASM
transformation/dependency-loading behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: dc03e0ae-2aff-4719-96aa-8188ffaf7ca6

📥 Commits

Reviewing files that changed from the base of the PR and between 1815cb1 and 7dc9e14.

📒 Files selected for processing (3)
  • .coderabbit.yaml
  • AGENTS.md
  • CLAUDE.md

Comment thread .coderabbit.yaml
Comment on lines +32 to +38
Module system:
- Modules are annotated `@GTEModule` and discovered via Forge's `ASMDataTable`
annotation scanning (`modules/ModuleManager.java`), not bytecode rewriting.
Check that new modules extend the correct base class and declare
`modDependencies` correctly for optional integrations.
- Integration modules under `integration/<mod>/` extend `GTBMIntegrationSubmodule`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -n --glob '*.java' 'ASMDataTable|IClassTransformer|`@GTEModule`|`@GregTechModule`|`@ModuleContainer`|class (GTE)?ModuleManager' .

Repository: GTModpackTeam/GTBeesMatrix

Length of output: 1738


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- candidate files ---'
fd -i -t f '(ModuleManager|BaseGTEModule|GTEModules|GTEModule|TModule|ModuleContainer|IClassTransformer|AGENTS|coderabbit)' . | sort

printf '%s\n' '--- module references in guidance ---'
rg -n -C 4 'Module|ASM|IClassTransformer|GTEModule|TModule|ModuleContainer|modDependencies' AGENTS.md .coderabbit.yaml

printf '%s\n' '--- module source outline ---'
ast-grep outline src/main/java/com/github/gtexpert/gtbm/module/ModuleManager.java --view expanded

printf '%s\n' '--- relevant manager implementation ---'
sed -n '1,130p' src/main/java/com/github/gtexpert/gtbm/module/ModuleManager.java
sed -n '350,435p' src/main/java/com/github/gtexpert/gtbm/module/ModuleManager.java

printf '%s\n' '--- annotation, container, and base-type declarations/usages ---'
rg -n -C 5 --glob '*.java' 'interface TModule|`@interface` TModule|class .*ModuleContainer|`@interface` ModuleContainer|interface IModule|class BaseGTEModule|GTBMIntegrationSubmodule|modDependencies|IClassTransformer|implements IClassTransformer|extends .*Module' src

Repository: GTModpackTeam/GTBeesMatrix

Length of output: 50384


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- exact declarations ---'
cat -n src/main/java/com/github/gtexpert/gtbm/api/modules/TModule.java
cat -n src/main/java/com/github/gtexpert/gtbm/api/modules/ModuleContainer.java
cat -n src/main/java/com/github/gtexpert/gtbm/module/Modules.java
cat -n src/main/java/com/github/gtexpert/gtbm/module/BaseModule.java
cat -n src/main/java/com/github/gtexpert/gtbm/integration/GTBMIntegrationSubmodule.java

printf '%s\n' '--- module manager entry points and references ---'
rg -n -C 5 'ModuleManager|getInstance\(\)|\.setup\(|ASMDataTable|ModuleContainer|TModule' src/main/java --glob '*.java' \
  | grep -E 'ModuleManager|setup\(|ASMDataTable|ModuleContainer|TModule' \
  | head -n 180

printf '%s\n' '--- transformation mechanisms ---'
rg -n -C 3 'IClassTransformer|ClassTransformer|transform\(|ASM|CoreMod|IFMLLoadingPlugin|Transformer' . \
  --glob '!AGENTS.md' --glob '!.coderabbit.yaml' --glob '!*.json' --glob '!*.md' \
  | head -n 240

printf '%s\n' '--- stale identifiers and paths ---'
rg -n 'GTEModule|GTEModuleManager|BaseGTEModule|GTEModules|`@GTEModule`|modules/ModuleManager|module/ModuleManager|TModule|BaseModule|Modules|ModuleContainer' AGENTS.md .coderabbit.yaml src/main/java --glob '*.java' | head -n 240

Repository: GTModpackTeam/GTBeesMatrix

Length of output: 25127


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- transformation-related files and symbols ---'
rg -n 'IClassTransformer|ClassTransformer|IFMLLoadingPlugin|transform\(|ASM|CoreMod|coremod' . \
  --glob '!AGENTS.md' --glob '!.coderabbit.yaml' --glob '!*.md' \
  --glob '!*.json' --glob '!*.yml' --glob '!*.yaml' \
  | head -n 180

printf '%s\n' '--- core package files ---'
fd -t f . src/main/java/com/github/gtexpert/gtbm/core | sort

printf '%s\n' '--- core source excerpts ---'
for f in $(fd -t f . src/main/java/com/github/gtexpert/gtbm/core | sort); do
  echo "### $f"
  rg -n -C 4 'class |interface |ASM|transform|IFML|CoreMod|LoadingPlugin' "$f" || true
done

printf '%s\n' '--- module container annotation usage ---'
rg -n -C 4 '`@ModuleContainer`|implements IModuleContainer|new Modules|class Modules' src/main/java --glob '*.java'

Repository: GTModpackTeam/GTBeesMatrix

Length of output: 6351


Align both guidance files with the current module contract.

  • Use ModuleManager at src/main/java/com/github/gtexpert/gtbm/module/ModuleManager.java.
  • State that Forge ASMDataTable scans @TModule and @ModuleContainer; module discovery does not use IClassTransformer.
  • Replace BaseGTEModule and GTEModules with BaseModule and Modules. Modules is registered manually by GTBMMod.
  • State that modules implement IModule, integration modules extend GTBMIntegrationSubmodule, and TModule.modDependencies contains the required mod IDs.
📍 Affects 2 files
  • .coderabbit.yaml#L32-L38 (this comment)
  • AGENTS.md#L46-L52
  • AGENTS.md#L63-L63
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.coderabbit.yaml around lines 32 - 38, Align the module guidance in
.coderabbit.yaml lines 32-38 and AGENTS.md lines 46-52 and 63 with the current
contract: reference ModuleManager at
src/main/java/com/github/gtexpert/gtbm/module/ModuleManager.java; state that
Forge ASMDataTable scans `@TModule` and `@ModuleContainer` and discovery does not
use IClassTransformer; replace BaseGTEModule/GTEModules with BaseModule/Modules,
noting that Modules is manually registered by GTBMMod; and state that modules
implement IModule, integration modules extend GTBMIntegrationSubmodule, and
TModule.modDependencies lists required mod IDs.

Source: MCP tools

Comment thread AGENTS.md

### Core Components

- **CoreMod** (`core/GTECoreMod.java`): FML loading plugin that performs ASM transformations and handles dependency loading

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -nP --glob '*.java' 'class\s+\w*CoreMod|IClassTransformer|ASMDataTable|ClassTransformer' .

Repository: GTModpackTeam/GTBeesMatrix

Length of output: 1532


🏁 Script executed:

#!/bin/bash
set -euo pipefail
printf '%s\n' '--- AGENTS.md context ---'
sed -n '55,75p' AGENTS.md
printf '%s\n' '--- core-related Java files ---'
git ls-files '*.java' | grep -Ei '(^|/)(core|.*core.*|.*transform.*)' || true
printf '%s\n' '--- core and transformer references ---'
rg -n -i --glob '*.{java,gradle,xml,md}' 'GTECoreMod|CoreMod|IClassTransformer|transformer|ASM|FML.*Loading|IFMLLoadingPlugin' . || true
printf '%s\n' '--- Java declarations containing Core ---'
rg -n --glob '*.java' 'class\s+\w*Core\w*|interface\s+\w*Core\w*|enum\s+\w*Core\w*' . || true

Repository: GTModpackTeam/GTBeesMatrix

Length of output: 10481


🏁 Script executed:

#!/bin/bash
set -euo pipefail
printf '%s\n' '--- tracked core-plugin declarations and references ---'
python3 - <<'PY'
import subprocess
from pathlib import Path

files = subprocess.check_output(["git", "ls-files"], text=True).splitlines()
terms = ("GTECoreMod", "CoreMod", "IFMLLoadingPlugin", "IClassTransformer", "ClassTransformer")
hits = []
for name in files:
    path = Path(name)
    if not path.is_file():
        continue
    try:
        text = path.read_text(errors="replace")
    except OSError:
        continue
    for term in terms:
        if term in text:
            hits.append((name, term))
print("\n".join(f"{name}: {term}" for name, term in hits) or "no tracked references found")

print("--- tracked Java declarations ---")
for name in files:
    if not name.endswith(".java"):
        continue
    text = Path(name).read_text(errors="replace")
    for line_no, line in enumerate(text.splitlines(), 1):
        if "class " in line or "interface " in line or "enum " in line:
            if "Core" in line or "Transformer" in line:
                print(f"{name}:{line_no}:{line.strip()}")
PY
printf '%s\n' '--- module discovery implementation ---'
sed -n '35,110p' src/main/java/com/github/gtexpert/gtbm/GTBMMod.java
sed -n '370,425p' src/main/java/com/github/gtexpert/gtbm/module/ModuleManager.java

Repository: GTModpackTeam/GTBeesMatrix

Length of output: 6054


🏁 Script executed:

#!/bin/bash
set -euo pipefail
printf '%s\n' '--- core-mod configuration ---'
rg -n -C 3 'coreModClass|IFMLLoadingPlugin|containsMixinsAndOrCoreModOnly|usesMixins' build.gradle buildscript.properties gradle.properties 2>/dev/null || true
printf '%s\n' '--- all tracked source paths under core ---'
git ls-files | grep -E '(^|/)(core|mixins)(/|$)' || true
printf '%s\n' '--- exact CoreMod-related source references ---'
rg -n -C 2 'CoreMod|core mod|coreMod|ASM transformation|bytecode|dependency loading' --glob '!libs/**' --glob '!AGENTS.md' --glob '!CLAUDE.md' .

Repository: GTModpackTeam/GTBeesMatrix

Length of output: 17023


Remove the stale CoreMod entry. The project does not define or configure GTECoreMod. Module discovery uses ASMDataTable, while mixins handle class changes. Describe CoreModule as a module instead of an FML loading plugin.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` at line 67, Remove the stale CoreMod entry from the documentation
and update the corresponding CoreModule description to identify it as a module,
not an FML loading plugin; do not reference the nonexistent GTECoreMod or ASM
transformation/dependency-loading behavior.

Source: MCP tools

@tier940
tier940 merged commit 3203584 into main Aug 6, 2026
2 checks passed
@tier940
tier940 deleted the chore/coderabbit branch August 6, 2026 05:57
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.

1 participant