n3Plugins Decision Playbook
Compact checklists for recurring task patterns. Derived from git history and repeated agent work. Read the relevant pattern before starting implementation.
Walker / Transport Changes
Triggered by: transport enum changes, collision map updates, Shortest Path resource updates, route handler modifications.
- Run focused transport tests first:
.\gradlew.bat test --tests com.n3plugins.sdk.walker.PluginTransportActionResolverTest --tests com.n3plugins.sdk.walker.NpcWalkerActionTest --tests com.n3plugins.sdk.walker.CanoeWalkerActionTest --console plain
- Run
auditWalkerTopologyto verify transport topology:.\gradlew.bat auditWalkerTopology --console plain - If Shortest Path resources changed, verify pinned resource integrity:
.\gradlew.bat test --tests com.n3plugins.sdk.walker.* --console plain
- Run full walker suite, then broader tests.
- Live verify: path overlays, transport row execution, gangplank recovery, and failed crossing replanning.
Revision Mapping Updates
Triggered by: RuneLite version bump, OSRS revision change, packet/reflection mapping drift.
- Update
revision-mappings/rev<N>.propertieswith evidence from ASM analysis. - Update
N3PLUGINS_SOURCE_OF_TRUTH.mdrevision and RuneLite version. - Run revision health check tests:
.\gradlew.bat test --tests com.n3plugins.PacketUtils.* --console plain
- If menu-action dispatch changed, clear
~/.runelite/cache/menu-action-plan.jsonand verify cold-cache resolution. - Verify revision-evidence cache at
~/.runelite/cache/revision-evidence-<N>.json. - Live verify: bootstrap ready state, native menu resolution, packet sends.
Plugin Porting (from External Source)
Triggered by: adapting Microbot, PiggyPlugins, or other external plugin code into n3Plugins.
- Domain review: verify OSRS mechanics, account requirements, UI assumptions.
- Map external APIs to n3 equivalents:
- External
Rs2Bank→BankActions - External
Rs2Npc→NPCActions - External
Rs2Widget→Widgets/sdk.widgets - External
sleep/sleepUntil→ remove; use tick-driven re-evaluation
- External
- Replace polling loops with event-driven
onGameTickstate checks. - Add Break Handler integration (register at startup, track active work only).
- Register in
runelite-plugin.properties. - Update SOT registered plugins table.
- Write tests: controller, workflow, state machine (deterministic, no live client).
- Review: safety, anti-detection shape, pacing, shared API usage.
SDK Refactors (Rename / Restructure)
Triggered by: API rename, package reorganization, shared helper consolidation.
- Use Serena
rename_symbolorfind_referencing_symbolswhen available. - Consumer sweep: find all callers of the changed surface.
- Update all test files referencing the old names.
- Update SOT if package maps or action catalog changed.
- Regenerate agent MCP SDK index:
.\gradlew.bat generateAgentMcpSdkIndex --console plain
- Run full test suite — SDK changes can break any consumer.
- Run
checkDocDriftto catch documentation references to old names.
Test Repair (After Behavioral Changes)
Triggered by: test failures after a feature or SDK change.
Priority order:
- Contract tests —
ApiJavadocCoverageTest,LegacyConstantParityTest, packaging tests - Scenario tests —
sdk.events.scenario,sdk.events.fixtureinfrastructure - Focused plugin tests — tests in the changed plugin's package
- Broad regression —
.\gradlew.bat test --console plain
Fix the root behavioral issue, not the test assertion. If the same test fails 3 times, stop and document the evidence.
Documentation Changes
Triggered by: modifying docs/**/*.md, skills, AGENTS.md, or SOT.
- Run the frontmatter fixer on changed docs:
python scripts/fix-docs-frontmatter.py <changed-paths>
- Run documentation audits:
.\gradlew.bat auditDocs checkDocDrift --console plain
- Regenerate LLM context:
python scripts/generate_llm_docs.pypython scripts/generate_llm_docs.py --check
- If canonical pages were added, register in
docs-site/sidebars.js.
Failure Taxonomy
Quick lookup for common failures. From docs/agent-testing-loop.md.
| Failure | Likely Cause | Next Step |
|---|---|---|
| Compile error | Signature drift, import mismatch, Java 11 violation | Read the live source, fix the smallest mismatch |
| Mockito setup failure | Inline/static mocking, mock inside thenReturn(...), final class | Refactor to injected collaborators or assign mocks to locals first |
| Widget miss | Hidden widget, wrong group/child, text tag mismatch, revision drift | Use WidgetExplorer, require visibility, compare against live UI |
| Pacing stall | Driver consumes ActionPacer, missing recordAction, double tick owner | Check PacketUtilsPlugin ownership and action-layer pacing |
| Walker stall | Plugin owns walker tick, stale route, missing transport, unreachable target | Inspect WalkerPath status and shared walker docs |
| Packet/runtime mismatch | Client revision or obfuscated mapping drift | Run revision health checks and verify in-client |
| Docs mismatch | SOT or source changed after prose written | Re-read source and update docs/catalog together |