Operating rules for AI agents working in this repository.
This repo is a documentation base, not an application. It has no build, tests, or runnable source in normal operation. The Markdown files are the product. Two on-request protocols (F, G) can create a temporary gitignored lab, but nothing from it is ever committed.
Languages: documents are written in Russian; code, API names, flags, file paths, commit messages, and this file are English.
The table in Project map is the index of this repository. Treat it as the source of truth for where things live.
The default workflow is map → grep → slice:
rg -n '<term>' <file>.read with offset/limit), not the whole file.edit, not a full rewrite.Open a file end-to-end only when you are rewriting it, or when the map says it is short. Reading every document “to get context” burns tokens and adds nothing: most files are 500–1900 lines and repeat the same canon.
Completion criterion: you can name the one or two files that own the fact you are changing, and you have read no more than the sections you need.
Paths are relative to the repository root. “Reach for it when” lists the branches that should trigger opening the file — if none apply, do not open it.
| Path | What it holds | Reach for it when |
|---|---|---|
README.md |
Public entry point: purpose, file table, key conclusions, page conventions, AI disclosure | Onboarding; updating the file table; changing public conventions |
AGENTS.md |
This file: agent workflow, canon, verification, on-request code/audit protocols | Any task starts here |
00-glossary.md |
Terms: loaders, mappings, Mixin, injectors, data components, rendering, debugging | A term is ambiguous, or you need the canonical one-line definition |
01-toolchain/1-build-systems.md |
Gradle plugins per era, Java/Gradle matrix, minimal build scripts, NeoForm/NFRT | Build fails; adding a project template; a plugin version changed |
01-toolchain/2-ide-and-navigation.md |
IntelliJ, Minecraft Development, Ravel, MixinMCP, jdx, mapping browsers, navigation routes | Choosing an IDE tool; explaining how to find a class or method |
01-toolchain/3-decompilers-bytecode.md |
Vineflower/CFR/Recaf, javap, bytecode reading, instruction → @At table |
A decompiler lies; descriptor or instruction semantics are unclear |
01-toolchain/4-debug-and-diagnostics.md |
mixin.debug.* flags, log reading, hotswap, spark/JFR, GameTest/HeadlessMc |
Runtime debugging, profiling, test automation |
01-toolchain/5-content-and-pipeline.md |
Datagen (NeoForge/Fabric), ItemModel, Blockbench, scripting, NBT tools, publishing, CI | Assets, generated JSON, release automation |
01-toolchain/6-tool-matrix.md |
Cross-category tool table with dead/legacy markers | Picking a tool; checking whether a tool is maintained |
02-mixin-playbook.md |
Core: four decisions, 12-step target search, @At reference, @Expression, injector matrix, remap rules, end-to-end examples |
Any “where do I inject / which injector” question |
03-mixin-cookbook.md |
18 recipes in 1.20.1 / 1.21.x / 26.x variants | A concrete task: damage, tooltip, HUD, tick, packet, recipe, spawn, etc. |
04-mixin-debugging.md |
Failure triage, error catalogue, refmap/namespace, conflicts, dev vs prod | A mixin does not apply or crashes |
05-version-changes/00-index.md |
Timeline 1.7.10 → 26.4, six eras, five watersheds, “where did X move” table | Locating the era for a version or a rename |
05-version-changes/1-legacy-forge.md |
1.7.10–1.12.2: MCP, coremods, GameRegistry, ASM |
Porting from legacy Forge; Mixin history |
05-version-changes/2-flattening.md |
1.13–1.16.5: flattening, registries, DeferredRegister, MatrixStack |
Porting 1.13–1.16 mods |
05-version-changes/3-modern-rename.md |
1.17–1.19.4: Mojmap, Level/BlockEntity, registries, chat |
Porting 1.17–1.19 mods |
05-version-changes/4-data-components.md |
1.20.x: Forge/NeoForge split, data components, datapack registries | Porting 1.20.x mods; item data questions |
05-version-changes/5-render-rewrite.md |
1.21.x: ItemModel, RenderPipeline, GuiRenderState, feature submission | Porting 1.21.x; GUI/render mixins |
05-version-changes/6-unobfuscated.md |
26.1–26.3: deobfuscation, Java 25, templates, Renderpearl/SDL3/OIT | Anything 26.x; mapping removal; graphics backend |
06-loaders-and-mappings.md |
Loader architecture, ModLauncher/Knot, mapping history, registries/events, Architectury/MultiLoader/Unimined, Sinytra, porting checklists, legacy stack | Choosing a loader; cross-loader port; mapping questions |
07-sources.md |
Primary sources by topic, verification method, refresh checklist | Adding a claim; checking a source; post-drop update |
LICENSE |
MIT | Legal only |
If a fact lives in one of these files, link to it instead of restating it. When a fact is unavoidably repeated (version numbers, Java requirements), it belongs to the Canon and must match everywhere.
tests/ is deliberately absent from this map. It is a gitignored scratch lab created only under protocol F; documents must never link to it.
These facts are cross-cutting and have caused contradictions before. Every document must agree with this table and the bullets below. If a source disproves one, update the canon first, then rg for the old value and fix every copy.
| Minecraft | Java | Primary loader stack | Build plugin | Mappings |
|---|---|---|---|---|
| 1.7.10–1.16.5 | 8 | Forge | ForgeGradle 1–5, RetroFuturaGradle | MCP |
| 1.17.x | 16 | Forge, Fabric | ForgeGradle 5, Loom | Mojmap + SRG |
| 1.18–1.20.4 | 17 | Forge, NeoForge (1.20.2+), Fabric, Quilt | ForgeGradle 6, ModDevGradle, Loom | Mojmap (+ Parchment) |
| 1.20.5–1.21.11 | 21 | NeoForge, Fabric | ModDevGradle, NeoGradle, Loom | Mojmap (+ Parchment) |
| 26.1–26.3 | 25 | NeoForge, Fabric | ModDevGradle 2.x, NeoGradle 7.x, Loom 1.14+ | none — game is deobfuscated |
officialMojangMappings() fails on 26.x.ResourceLocation was renamed to Identifier in 1.21.11/26.1. Same type, same methods.ItemStack needs loaded registries, so immutable data uses ItemStackTemplate; NeoForge mirrors this with FluidStackTemplate/ItemResource.GuiGraphics → GuiGraphicsExtractor, Screen#render → extractRenderState.net.fabricmc.fabric-loom (unobfuscated) vs net.fabricmc.fabric-loom-remap (obfuscated). Loom needs Gradle 9.2+.@WrapOperation over @Redirect, @ModifyExpressionValue over @ModifyConstant, @ModifyReturnValue over @Inject(RETURN).@At("LOAD") / @At("STORE") exist but work only with @ModifyVariable.mixin.remap is not a system property. remap is an annotation attribute; the property is mixin.env.remapRefMap.Every factual sentence needs a primary source: official docs, javadoc, game/loader source, maven-metadata, or the Minecraft Wiki. Community posts may support a claim but never carry it alone.
When writing:
проверено 2026-11-21 на NeoForge 26.3.0.113.[draft] — official docs still in draft;[community] — community practice, not first-party;[unverified] — not confirmed in a running game.Absence of a tag means the claim is backed by the cited source and the page’s Проверено на block. Tags mark uncertainty only; there is no [verified] tag to add.
Completion criterion: every non-obvious claim has a link or a tag, and no API name was written from memory without a check.
README.md → “Конвенции страницы”: H1 → breadcrumb → TL;DR callout → contents → sections → “Проверено на” → “Источники”. Content pages must end with both blocks; meta pages (README.md, AGENTS.md, 00-glossary.md, 07-sources.md) may omit them because they navigate or aggregate instead of asserting new facts.> [!NOTE], > [!WARNING]) for traps, Mermaid only when a flow is genuinely non-linear.edit” beats “don’t rewrite files”.Each workflow ends with a completion criterion. Do not stop before it is met.
rg -n for the term; read only the matching section.edit. Preserve the surrounding style and links.rg the old value and update every copy.Done when: the diff is minimal, all copies agree, links resolve, and the page still follows the template.
README.md file table and to the Project map here, with a real “reach for it when” trigger.07-sources.md if the page introduces new primary sources.Done when: the page is reachable from README and the map, has sources, and no orphan copy of existing facts.
05-version-changes/00-index.md (timeline, era table).6-unobfuscated.md for 26.x) with a “what changed” section.03-mixin-cookbook.md and procedures in 02-mixin-playbook.md.07-sources.md.Done when: no page claims the previous drop is current, and old values are gone (rg for them).
[unverified] rather than guessing.Done when: the source is cited in the diff description and the old claim no longer appears.
Give the agent:
After it returns: review every risky fact, fix fabrications, run verification, then commit. A subagent’s output is a draft, not a finished page.
Trigger: the user explicitly asks to verify, compile, or test the examples. The default workflow treats code as illustrative; this protocol temporarily replaces that assumption for the requested scope.
Setup
tests/ in the repository root. It is gitignored: never stage it, never link documentation to it, never ship it.tests/neoforge-26.3, tests/fabric-1.21.1, tests/forge-1.20.1. Plugins, toolchains and mappings conflict across eras; separate builds keep each one honest.01-toolchain/1-build-systems.md), pin exact versions, and use the matching toolchain: 8 for legacy, 16 for 1.17, 17 for 1.18–1.20.4, 21 for 1.20.5–1.21.11, 25 for 26.x.Inventory
List every fenced block in scope: file, line, language, claimed version/loader, kind (mixin, plain Java, JSON, Gradle, shell, pseudo-code). rg -n '^``’ -g ‘*.md’` gives the candidates; record the table before touching any build.
Classify each block:
| Kind | Check |
|---|---|
| Java / mixin | Compiles against the pinned stack |
JSON (pack.mcmeta, models, recipes, mixins.json) |
Parses, correct schema, loads in game where relevant |
| Gradle / properties | Applies, task exists, build succeeds |
| Shell | Runs in a clean checkout of the documented layout |
| Pseudo-code | Cannot compile; mark illustrative in the doc |
Compile
dev.docscheck.<doc>.<n>; keep the documented names.@Shadow members exist on the pinned version. Compilation alone does not prove an @At target — see the behavior step../gradlew build per project. Record the exact task and outcome.Behavior
Define the expected observation before running; a run without an expectation is not a test.
-Dmixin.debug.export=true -Dmixin.debug.countInjections=true; assert the apply log line and the changed behavior. For GUI, verify manually or via the loader’s screenshot/test hooks.Fix loop
When a check contradicts the doc:
Проверено на and, if the status changed, the README verification table.[unverified] with the reason instead of claiming success.Report
Return a table: sample → version/loader → compile → behavior → doc action (none / fixed / tagged / blocked). Name the exact versions and commands used.
Done when: every block in scope has a status (compiled, behavior verified, blocked, not applicable), and every divergence is either fixed in the docs or tagged with its reason.
Trigger: the user asks to re-check correctness or to look for invented content. Scope is the files the user names; with no scope, audit all docs, high-risk sections first.
Priority order. Spend effort where a model is most likely to invent:
Steps
confirmed — matches the owner source;wrong — contradicts it;stale — was true for an older version;unverifiable — no primary source found;community — only community sources support it.wrong → fix the claim and every copy (rg the old value);stale → update or scope it to the version where it was true;unverifiable → narrow the claim and add [unverified]; never upgrade it to fact;community → keep the [community] tag and cite the source.Проверено на blocks. Contradictions between pages are findings too.Anti-patterns
Report
Return a table: claim → verdict → source → action → commit. State explicitly what remains [unverified] and why.
Done when: every high-risk claim in scope has a verdict, every wrong/stale claim is fixed, every remaining uncertainty is tagged, and the mechanical checks pass.
Run from the repository root.
Relative link check (must print missing: 0):
python3 - <<'EOF'
import os, re
missing = {}
for dirpath, _, files in os.walk('.'):
if '.git' in dirpath:
continue
for f in files:
if not f.endswith('.md'):
continue
p = os.path.join(dirpath, f)
txt = open(p, encoding='utf-8').read()
for m in re.finditer(r'\]\(([^)#]+\.md)(#[^)]*)?\)', txt):
t = m.group(1)
if t.startswith('http'):
continue
tp = os.path.normpath(os.path.join(dirpath, t))
if not os.path.exists(tp):
missing.setdefault(tp, []).append(p)
for k, v in sorted(missing.items()):
print(k, '<-', ', '.join(sorted(set(v))))
print('missing:', len(missing))
EOF
Other checks:
git diff --check # whitespace errors
rg -nP '[\x{4e00}-\x{9fff}]' -g '*.md' # stray CJK characters
rg -n 'TODO:|TBD|FIXME' -g '*.md' # unfinished text
Also confirm by eye: template order, TL;DR present, Проверено на and Источники at the end, tables render (no broken pipes).
Code blocks are documentation, not a build target: no example in this repo is compiled or run by the documentation workflow itself. That does not lower the bar for accuracy — it moves the check earlier, to the source.
When adding or changing code:
javap -s. A plausible-looking parameter list is the most common fabrication.[unverified] next to the example and say which part is uncertain.javap -s, IDE Ctrl+Click, -Dmixin.debug.export=true + .mixin.out/class.Update the README verification table when the status changes (for example, “examples compiled on 26.3” versus “not compiled”). The table describes the current state; this section describes the rule.
docs(mixins): add target-discovery playbook.toolchain, mixins, versions, loaders, sources, glossary, meta.git add ..main; this repo is published.Done when: git log --oneline reads as a changelog a human can follow.
A task is complete only when all of these are true:
missing: 0.Stop and ask when:
Guessing is the failure mode this repo is built to avoid. An explicit [unverified] is always better than a confident invented API.
[!NOTE] The repository-level
AGENTS.mdyou may see in the home directory mentionscode-review-graphMCP tools. This repo contains no code graph; those tools add nothing here. Use the map,rg, and the primary sources.