Skip to content

Agent Guide

rayswaynl edited this page Jul 6, 2026 · 3 revisions

Agent Guide

Agents START HERE (after AGENTS.md / CLAUDE.md in this wiki root). This page is the canonical reference for HARD rules, trap taxonomy, claim protocol, and revision history. It supplements — not replaces — the LLM Agent Entry Pack and the mission-repo AGENTS.md.

Boot Order

Canonical boot order for every agent session. Other pages that describe a boot order defer to this one.

  1. This page — HARD rules, trap taxonomy, claim protocol.
  2. Current live state — live build, base branch, map rotation, release flow.
  3. Page Index — lookup for any subsystem or topic page.
  4. LLM agent entry pack — task bundles and machine-file routing.

HARD Rules by Category

All rules tagged [HARD] are non-negotiable. Violations block the PR or corrupt the mission.

Mirror / Terrain

Rule Detail
Edit only Missions/[55-2hc]warfarev2_073v48co.chernarus Chernarus is the source mission for all gameplay edits.
Run dotnet run -c RELEASE in Tools/LoadoutManager to regenerate Generates both Takistan AND Zargabad from Chernarus. Omitting -c RELEASE defaults to DEBUG.
Inspect TK and ZG output after every LoadoutManager run Verify TK=61 players (no naval), ZG=61 players (STARTING_DISTANCE 5000). Never let CH values bleed into TK/ZG.
Restore version.sqf.template before staging LoadoutManager may drift version.sqf.template in TK and ZG. Restore to merge-base state before git add.
mission.sqm is not mirrored TK and ZG mission.sqm edits are separate manual tasks; LoadoutManager does not touch them.
ZG-specific constants live in Common/Init/Init_CommonConstants.sqf A worldName == "Zargabad" guard block (lines 85–97) pre-sets constants before the CH/TK isNil defaults. Key identifiers from that block: WFBE_C_AICOM_HQSTRIKE_MIN_TOWNS, WFBE_C_AICOM_ENGAGE_MIN_TOWNS, WFBE_C_BASE_EGRESS_MAP_BOUNDS. No separate Init_Zargabad.sqf or Zargabad_EdgeGuard.sqf files exist. Do not apply CH/TK values to ZG without checking this block.

SQF Editing on Windows

Rule Detail
Use targeted Python scripts for SQF edits The Edit/Write tools trigger a formatter that reflows entire files (column-wrap churn). Use read/replace/write scripts that preserve CRLF and indentation.
Never use A3-only commands Banned list: isEqualType, isEqualTo, params, pushBack, findIf, selectRandom (command form), apply, forceFollowRoad, worldSize, getPosVisual, array reveal, A3 string find, substring select [a,b], sort-by-code, remoteExec, distance2D, setGroupOwner, groupOwner, joinGroup.
inline private _x = is A3-only Use private ["_x"]. The A3 inline form killed live missions silently.
Never use ==/!= with Boolean operands Use if (_flag) / if (!_flag).
Never use 2-arg getVariable [name, default] on a GROUP receiver Use WFBE_CO_FNC_GroupGetBool or 1-arg + isNil.
Capture outer _x before any inner forEach Inner forEach permanently rebinds _x in OA scope.
Never use exitWith inside forEach to skip one iteration Use if nesting.
Never use publicVariableServer from the server Call the server callback directly.
getDammage/setDammage (double-m) is correct A2 spelling Do not rename.
;;, && {code}, `
Never use missionNamespace setVariable with a third (public) argument NSSETVAR3 trap — causes A2/OA runtime error. Not yet in CI select; use check_sqf.py --select NSSETVAR3.
Guard numeric threshold flags with > 0, not bare if (number) if (0) in OA is truthy; if (number > 0) is the correct guard.
Never use isKindOf on weapon or magazine classnames It walks CfgVehicles; wrong config tree for weapons.
"Has launcher" = non-empty secondaryWeapon _unit Not primaryWeapon.
Never reset MenuAction before second click in two-click confirm Breaks the confirmation flow.
Every new classname must appear in the mission tree or the PR must include config proof

Flag Policy

Rule Detail
Feature additions: flag-gate with default 0 missionNamespace getVariable ["WFBE_C_FLAG", 0]. With flag at 0, mission must be byte-identical to HEAD.
Correctness fixes (crashes, nil dereferences, idempotency guards): ship without flags No flag required for bug fixes.
Append new flag registrations to Init_CommonConstants.sqf only Never change existing defaults. Append-only.
WFBE_C_SIM_GATING is owner-rejected Never wire it.

PR Mechanics

Rule Detail
Draft PRs only gh pr create --draft --base claude/build84-cmdcon36 (base branch verified current in Current live state; the branch name is lineage, not the live build number)
Branch naming codex/<lane>-<topic>; never target master
Commit format feat(<lane>): <summary> [flag <FLAG> default 0]; no Co-Authored-By trailer
PR body required fields Feature; flag + default; why flag-off is inert; test plan; mirrors confirmed (CH→TK→ZG)
Check before claiming agent-status.json, open PRs, remote branches, the Shelved registry, and the Owner Constraints table on this page
Stacked-PR rule When target file is in-flight in another PR, base on that PR's HEAD, declare "stacked on #NNN" in PR body
Never stage line-ending-churn files, _MISSIONS.7z, or nul These are common Windows-only artifacts

Verification Before PR

Rule Detail
Run check_sqf.py --select A3CMD,A3MARKER,A3REVEAL,A3SELECT,A3SORT,A3STRING,GROUPGETVAR,BRACKET,NSSETVAR3 --no-classname-index Run this before every PR; 0 findings required
AICOM team logs go to the HC RPT (ArmA2OA.RPT) Not arma2oaserver.RPT. Scope reads to the current MISSINIT boundary.
Verify bracket balance Net {} and [] delta must be zero per changed file. Use a Python count.
Run dotnet run -c RELEASE -- --check to verify TK/ZG mirror drift Without generating files; use A2WASP_SKIP_ZIP=1 for propagation-only runs.

Owner Constraints

Rule Detail
Never deploy to the live server PRs are the only output.
Never touch: HC architecture, player enrollment/JIP flow, deploy/box scripts
GUER volume is the point No caps or nerfs to GUER output.
Do not re-propose: TPWCAS, AI supply trucks, satchel AI, EMP/WP/DECOY SCUD munitions, doctrine personalities, antistack touch, ACR content Owner-rejected; check wiki/Shelved-PR-*.md before proposing any audit-flagged fix.
Shelved PRs are closed Do not re-open or duplicate. See wiki/Shelved-PR-*.md pages.

Trap Taxonomy

Trap Class One-line explanation
inline private _x = A3-only syntax Silently kills the enclosing script in A2 OA; use private ["_x"]
getPosVisual A3-only command Undefined in OA 1.64; use visiblePosition. Shipped live in PR#122, fixed cmdcon30.
selectRandom (command form) A3-only command OA uses array select with random index; command form is A3.
params (SQF command) A3-only command OA uses _this select N or paramsArray; SQF params is A3.
pushBack A3-only command Use _arr = _arr + [item] in OA.
findIf A3-only command Use explicit forEach with index tracking in OA.
apply A3-only command Use forEach with result array construction in OA.
isEqualTo / isEqualType A3-only commands Use == for values; check type with typeName.
forceFollowRoad A3-only command No OA equivalent; remove.
worldSize A3-only command Use map-specific constant in OA.
array reveal (2-arg form) A3-only variant Use OA 1-arg reveal.
getDammage rename False cleanup Correct A2 double-m spelling; renaming to single-m breaks the engine binding.
;; removal False cleanup Valid A2 OA; double-semicolons are not syntax errors.
&& {code} removal False cleanup Valid lazy-evaluation form in OA.
isNil {block} removal False cleanup Valid OA block form.
NSSETVAR3 A2/OA runtime fatal missionNamespace setVariable [name, value, true] — the third (public) argument causes A2/OA runtime error.
getVariable [name, default] on GROUP A2 OA group-variable trap Returns nil in A2 OA (not default); use WFBE_CO_FNC_GroupGetBool or 1-arg + isNil. See Group-Bool-GetVariable-A2OA-Trap-Reference.
if (number) as flag guard OA truthy trap if (0) is truthy in OA; use if (number > 0).
exitWith inside forEach Loop-skip misuse Exits the enclosing scope, not just the current iteration; use if nesting.
outer _x clobbering forEach scope Inner forEach rebinds _x permanently in OA; capture outer _x first.
publicVariableServer from server No-op On the server, call the handler directly.
isKindOf on weapons Wrong config tree Walks CfgVehicles; classname checks on weapons/mags need CfgWeapons path.
secondaryWeapon = launcher Slot confusion secondaryWeapon returns the launcher slot; primaryWeapon is primary.
MenuAction reset before second click UI confirm break Breaks the two-click confirmation FSM.
Missing classname proof PR blocker New classnames must exist in the mission tree or the PR must prove config existence.
setVariable [..., true] = trusted Authority confusion Publishing object/group state does not make client-written authority data trustworthy.
7za missing warning Packaging only 7za missing blocks packaging only, not copy-generation. Use A2WASP_SKIP_ZIP=1 for propagation-only runs.
remoteExec / remoteExecCall A3-only command Not present in OA 1.64; use OA-era public variables and PVEHs.
distance2D A3-only command Not available in OA 1.64; use _a distance _b (3-D) and compute 2-D manually if needed.
setGroupOwner A3-only command Does not exist in OA 1.64; group locality cannot be transferred with this command.
groupOwner A3-only command Does not exist in OA 1.64; owner queries on groups are not supported.
joinGroup A3-only command Throws "Missing ;" in OA 1.64 (RPT-confirmed, SkinSelector_Apply.sqf:183). Use [unit] join grp (array LHS).

Claim Protocol

  1. Check agent-status.json for in-progress claims on the target files.
  2. Check open PRs for in-flight branches touching the same files.
  3. Search remote branches (git ls-remote --heads origin) AND open PRs for the TOPIC, not just the exact target files. A worklog claim alone does not prevent duplicate work: on 2026-07-04 the lane-456 collision produced duplicate work because a worklog claim existed but nobody searched remote branches and open PRs for the topic first.
  4. Check the Shelved registry and the Owner Constraints table on this page for owner-rejected or shelved topics.
  5. If a target file is touched by an in-flight PR, base your branch on that PR's HEAD and declare "stacked on #NNN" in the PR body.
  6. One active claim at a time per lane.

After the pre-flight checks above, for wiki edits:

  • Append a claim entry to Agent-Worklog.md. Format: ## <ISO8601 timestamp> - <Agent-ID> - <lane-id> claim. State scope and files you will not touch. Do not reorder other entries.
  • Build and validate. Run check_sqf.py for source lanes; inspect TK+ZG mirrors; verify bracket balance.
  • Open a draft PR for source changes: gh pr create --draft --base claude/build84-cmdcon36 (base branch verified current in Current live state; the branch name is lineage, not the live build number). Include the required body fields.
  • Append a release entry to Agent-Worklog.md: state PR number (or wiki pages changed) and validation summary.

If a push to the wiki races (non-fast-forward), use the fetch-rebase-union-push loop:

git fetch
git rebase origin/master
# union-merge any conflicting sections: keep both agents' content
git push

Do not force-push. Do not drop other agents' appended worklog entries.


GUIDE-REV History

Rev ID Date Summary
GR-2026-07-06a 2026-07-06 Agent-readiness routing overhaul: canonical Boot Order section added (this page → Current live state → Page Index → LLM agent entry pack); base-branch lineage parenthetical added at both --base claude/build84-cmdcon36 occurrences; Claim Protocol extended with the lane-456 remote-branch/open-PR topic pre-flight (2026-07-04 collision); unfindable "Block J avoid-list in the fleet prompt" references replaced with the Shelved registry page and the Owner Constraints table
GR-2026-07-03a 2026-07-03 Initial agent-guidance doc pair (AGENTS.md + CLAUDE.md) for wiki repo; Agent-Guide page with HARD rules, trap taxonomy, claim protocol; ZG boot context added to LLM-Agent-Entry-Pack and AI-Assistant-Developer-Guide; stale 0-hits headline removed from Arma-2-OA-Compatibility-Audit; re-run cadence note added

Continue Reading

Mission-repo rules: AGENTS.md | LLM Agent Entry Pack | AI Assistant Developer Guide | Arma 2 OA Agent Traps Reference | Group-Bool-GetVariable A2-OA Trap | Agent Collaboration Protocol

Main map: Home | Page Index | Agent Worklog

Sidebar

Clone this wiki locally