relace
mistral
voyage
voyage
# Rust/Oxide Plugin Work — MCP-first, token-safe
You are working on Oxide Rust plugins in this tree:
- Oxide root: D:\!RustServer\oxide
- Plugins: oxide/plugins/*.cs
- Config/data: oxide/config, oxide/data
Hotload via oxide.reload <PluginName>. Do NOT touch Assembly-CSharp. (Source of truth)
[Keep hooks signature-correct, avoid blocking calls / large allocs in hooks.]
## Default Workflow for ANY request
1) Clarify task → identify target files/functions.
2) **Never read whole files > ~2–3k lines**. If a file is large (e.g., `oxide/plugins/VehicleLicence.cs`), **use MCP tools** to work in slices:
- `Filesystem`: search first (grep) → open only small spans around matches.
- `RepoMix`: build/refresh a high-level outline and section map. Summarize sections before reading details.
- `GitHub` (if mirrored): use blame/diff to narrow the edit surface.
- `Memory`: recall prior section maps / anchor points you stored.
3) Search-first, read-small:
- Run MCP **grep** for anchors (types, methods, regions, constants, error lines). Prefer patterns like:
- `class VehicleLicence`
- `#region`, `OnEntityDeathOrKill`, `LoadKaruzaCatalog`, `RegisterCustomVehicle`, `PrefabPath`, etc.
- Read only ±150–300 lines around each hit. If still too broad, tighten the regex and re-fetch.
4) Token budget guardrails:
- Keep your running context under 30–40k tokens. If approaching budget, **summarize working context** (function signatures, key fields, invariants) and drop raw code you no longer need.
- Prefer **diffs/patches** over whole-file rewrites.
- If many areas need edits, process **one region at a time** (search → read slice → patch → summarize).
5) Patch style:
- Output **unified diff** or **minimal code blocks** for just the changed regions.
- Preserve file CRLFs, namespaces, and formatting.
- Do not refactor broadly unless asked; keep changes surgical and deterministic.
6) Oxide specifics:
- Respect hook signatures and return types.
- Avoid heavy work in hot hooks; push scanning/cache building to Init/OnServerInitialized or timers.
- Keep config I/O in `oxide/config` and data in `oxide/data`.
7) After edits:
- Provide the exact `oxide.reload <PluginName>` command and any config/data file changes required.
## When you hit token pressure
- Summarize the current slice to a compact “working set” (method signatures, local types, key fields, side effects).
- Discard raw code from the context once summarized.
- Continue with fresh MCP fetches for the next slice.
# VehicleLicence.cs — Targeted Navigation Hints
When the task involves VehicleLicence.cs, assume it is LARGE. Work only on slices.
Primary anchors to search with MCP grep (case-insensitive):
- Types/regions: `class VehicleLicence`, `#region Fields`, `#region Oxide Hooks`, `#region Methods`, `#region GetSettings`, `#region Karuza Catalog Loader`
- Custom vehicles: `LoadKaruzaCatalog`, `_catalogByName`, `CustomVehicleConfig`, `LoadCustomVehiclesFromConfig`, `EnumerateConfigs`, `RegisterCustomVehicle`, `CreateCustomVehicleSettings`
- Permission/command wiring: `commandToVehicleType`, `RegisterPermission`, `cmd.AddChatCommand`
- Death/refund: `OnEntityDeathOrKill`, `RefundVehicleItems`, `DropItemContainer`
- Push/loot/mount gates: `OnVehiclePush`, `CanLootEntity`, `CanMountEntity`
- Damage/decay: `OnEntityTakeDamage`, `GetBaseVehicleDamage`, `GetBaseVehicleCollisionDamage`
Reading discipline:
- Fetch ±150–300 lines around each anchor hit. Summarize signatures + side effects before you fetch another slice.
- If adding fields (e.g., `PrefabPath`, `SkinID`) to settings types, **locate the concrete settings classes** (e.g., `MiniCopterSettings`, `CarSettings`, etc.) and modify ONLY those types and the factory/registration call sites.
Change output:
- Provide a minimal unified diff for each touched region. Include enough context lines to apply cleanly.
- If a change requires new config files, output an example JSON and the target folder under `oxide/config`.
Safety:
- Keep hook returns correct (return null vs. object/boolean as required).
- Do not call expensive I/O or allocations inside hot hooks; prefer Init/OnServerInitialized/timers.
No Docs configured
No Prompts configured
No Data configured
npx -y @modelcontextprotocol/server-github
npx -y @modelcontextprotocol/server-memory
npx -y repomix --mcp
npx -y @modelcontextprotocol/server-filesystem ${{ secrets.grimm530/grimmzone/anthropic/filesystem-mcp/PATH }}