Owner decision (2026-08-28): Superheat Item uses a dynamic recipe table
governed by Smithing level — highest UNLOCKED recipe selected, primary ore
(target_input, never coal) is the spell target, fallback to the next lower
unlocked recipe, else skip SII and stay on LA.
- magic-alch-handoff: per-recipe target_input; selection block
(mode highest-unlocked / eligible_rule / fallback); full-lifecycle
actions (buy-staff, equip-staff w/ fire-rune failure path, buy-supplies,
cast-alch, cast-superheat, bank-loop, take-break); deterministic restock
(LA/HLA carried_batch 1,000 + threshold 100 -> 901-cast batches; SII
24-cast bank cycles, bars >= 24); breaks [400,700] COMPLETED casts,
independent of banking; worked example pinned (prep -> first restock @24
-> break @550 -> resume -> restock @552); stop conditions + recovery block
- rates REALIZED incl. mandatory breaks + banking: LA 24,500 / SII 27,500 /
HLA 51,400 xp/hr (formulas pinned; loop-only 837/hr and 305/hr regimes
superseded); low-alch-f2p also switched (xp 24,500, gp -110,500..-74,000)
- validate.py: rows now collected ONLY after schema validation (schema-
invalid MAPPINGS incl. 'economy: not-a-mapping' produce normal ERRORs,
never AttributeError tracebacks — end-to-end subprocess regression added);
new gates: recipe_model_errors (target_input in declared inputs, coal
never targetable, unique smithing gates, selection block + SII/fallback
transitions) and rate_errors (xp_per_hour must match the realized cadence,
tolerance 2%); highest_unlocked_recipe helper + 6 eligibility fixtures
- entry.schema.json: optional selection block + per-recipe target_input
- Evidence: validate 2 entries 0 errors 0 warnings; --selftest 31 PASS;
governor's exact direct repro supply_limit_conflicts([('bad.yaml',
{'economy':'not-a-mapping'})]) -> [] no crash; synthetic 3-way merge of
main 79cab78 (incl. issue-6 catalog) + head: clean, gate green; git
diff --check clean
265 lines
9.3 KiB
JSON
265 lines
9.3 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "OSRS Codex Entry",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"id", "title", "domain", "tags", "status", "version", "updated",
|
|
"summary", "accounts", "best_practice", "state_machine", "actions",
|
|
"run_control", "risk", "sources", "verified"
|
|
],
|
|
"properties": {
|
|
"id": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$", "maxLength": 64 },
|
|
"title": { "type": "string", "minLength": 3 },
|
|
"domain": {
|
|
"enum": ["economy", "training", "combat", "combat-slayers", "quests", "transport", "meta"]
|
|
},
|
|
"tags": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
|
|
"status": { "enum": ["draft", "verified", "stale"] },
|
|
"version": { "type": "integer", "minimum": 1 },
|
|
"updated": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
|
|
"summary": { "type": "string", "minLength": 10 },
|
|
|
|
"accounts": {
|
|
"type": "object",
|
|
"required": ["membership", "min_level"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"membership": { "enum": ["f2p", "members", "hybrid"] },
|
|
"min_level": { "type": "integer", "minimum": 1, "maximum": 126 },
|
|
"requires_quest": { "type": "array", "items": { "type": "string" } },
|
|
"requires_other": { "type": "array", "items": { "type": "string" } }
|
|
}
|
|
},
|
|
|
|
"economy": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"item": { "type": "string" },
|
|
"item_id": { "type": "integer" },
|
|
"cost_per_cycle": { "type": "number" },
|
|
"income_per_cycle": { "type": "number" },
|
|
"net_per_cycle": { "type": "number" },
|
|
"gp_per_hour_low": { "type": "number" },
|
|
"gp_per_hour_high": { "type": "number" },
|
|
"xp_per_hour": { "type": "number" },
|
|
"supplies": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["item", "qty_per_cycle", "source"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"item": { "type": "string" },
|
|
"qty_per_cycle": { "type": "number", "exclusiveMinimum": 0 },
|
|
"source": { "enum": ["ge", "p2p", "drops", "craft", "bank", "npc-shop"] },
|
|
"ge_limit": { "type": "integer", "minimum": 1 }
|
|
}
|
|
}
|
|
},
|
|
"profit_drivers": { "type": "array", "items": { "type": "string" } }
|
|
}
|
|
},
|
|
|
|
"selection": {
|
|
"type": "object",
|
|
"required": ["mode", "eligible_rule", "fallback"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"mode": { "enum": ["highest-unlocked"] },
|
|
"eligible_rule": { "type": "string", "minLength": 10 },
|
|
"fallback": { "type": "string", "minLength": 10 }
|
|
}
|
|
},
|
|
|
|
"recipes": {
|
|
"type": "object",
|
|
"minProperties": 1,
|
|
"propertyNames": { "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"required": ["bar", "smithing_level", "target_input", "inputs"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"bar": { "type": "string", "minLength": 2 },
|
|
"bar_item_id": { "type": "integer", "minimum": 1 },
|
|
"smithing_level": { "type": "integer", "minimum": 1, "maximum": 126 },
|
|
"smithing_xp": { "type": "number", "exclusiveMinimum": 0 },
|
|
"target_input": { "type": "string", "minLength": 2 },
|
|
"inputs": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["item", "qty", "source"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"item": { "type": "string", "minLength": 2 },
|
|
"item_id": { "type": "integer", "minimum": 1 },
|
|
"qty": { "type": "integer", "minimum": 1 },
|
|
"source": { "enum": ["ge", "p2p", "drops", "craft", "bank", "npc-shop"] }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
"best_practice": {
|
|
"type": "object",
|
|
"required": ["equipment"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"equipment": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["item", "why", "source"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"item": { "type": "string", "minLength": 2 },
|
|
"why": { "type": "string", "minLength": 5 },
|
|
"source": { "type": "string", "minLength": 5 }
|
|
}
|
|
}
|
|
},
|
|
"techniques": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["name", "why", "source"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"name": { "type": "string", "minLength": 2 },
|
|
"why": { "type": "string", "minLength": 5 },
|
|
"source": { "type": "string", "minLength": 5 }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
"state_machine": {
|
|
"type": "object",
|
|
"required": ["initial", "terminal", "states"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"initial": { "type": "string" },
|
|
"terminal": {
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"minItems": 1,
|
|
"contains": { "const": "failed" }
|
|
},
|
|
"states": {
|
|
"type": "object",
|
|
"minProperties": 2,
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"required": ["goal"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"goal": { "type": "string", "minLength": 3 },
|
|
"next": { "type": "array", "items": { "type": "string" }, "minItems": 1 }
|
|
}
|
|
}
|
|
},
|
|
"transitions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["from", "when", "to"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"from": { "type": "string" },
|
|
"when": { "type": "string", "minLength": 3 },
|
|
"to": { "type": "string" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
"actions": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["id", "step", "verb", "on_fail"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"id": { "type": "string", "pattern": "^a[0-9]+$" },
|
|
"step": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
|
|
"verb": {
|
|
"enum": [
|
|
"login", "select_world", "hop_world", "is_logged_in",
|
|
"move_to", "walk_to", "teleport", "enter_region", "open_door",
|
|
"use_item_on", "click_object", "right_click", "talk_to",
|
|
"click_button", "menu_option",
|
|
"bank_inventory", "deposit_all", "withdraw", "has_item",
|
|
"count_item", "move_to_inv", "sort_inventory",
|
|
"ge_open", "ge_buy", "ge_sell", "ge_offers_done", "ge_collect",
|
|
"ge_check_price",
|
|
"attack", "prayer", "buff", "eat", "retreat", "is_dead", "respawn",
|
|
"is_at", "item_count", "level_is", "xp_is", "hp_is",
|
|
"ge_clear", "bank_open", "quest_state", "npc_present",
|
|
"log", "alert", "sleep", "human_move", "take_break"
|
|
]
|
|
},
|
|
"target": { "type": "string" },
|
|
"params": { "type": "object" },
|
|
"on_fail": { "enum": ["retry", "skip", "abort", "alert"] },
|
|
"anti_ban": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"delay": {
|
|
"type": "array",
|
|
"items": { "type": "number", "minimum": 0 },
|
|
"minItems": 2,
|
|
"maxItems": 2
|
|
},
|
|
"mouse": { "type": "string" },
|
|
"jitter": { "type": "number", "minimum": 0 }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
"run_control": {
|
|
"type": "object",
|
|
"required": ["iteration", "stop_conditions"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"iteration": { "type": "string" },
|
|
"max_iterations": { "type": ["integer", "null"], "minimum": 1 },
|
|
"break": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"every": { "type": "array", "items": { "type": "number", "minimum": 1 }, "minItems": 2, "maxItems": 2 },
|
|
"for": { "type": "array", "items": { "type": "number", "minimum": 1 }, "minItems": 2, "maxItems": 2 }
|
|
}
|
|
},
|
|
"stop_conditions": { "type": "array", "items": { "type": "string" }, "minItems": 1 }
|
|
}
|
|
},
|
|
|
|
"risk": {
|
|
"type": "object",
|
|
"required": ["ban_level"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"ban_level": { "enum": ["low", "medium", "high"] },
|
|
"notes": { "type": "array", "items": { "type": "string" } }
|
|
}
|
|
},
|
|
|
|
"sources": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
|
|
"verified": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
|
|
"related": { "type": "array", "items": { "type": "string" } }
|
|
}
|
|
}
|