Bundled RECTGTN HTN planning domains and problems, embedded into this module at compile time.
taskweft_plans ships priv/plans/{domains,problems}/*.jsonld (plus a
handful of *.notes.json siblings). Prior to this module, callers (e.g.
taskweft_mcp's resource handlers) read those files off disk at runtime
via :code.priv_dir(:taskweft_plans) — fragile under some release/
container packaging setups, where a dependency's priv/ can end up
missing from the assembled release even though it's listed in package: files: (the same failure class taskweft/taskweft's
Taskweft.JSONLD.Loader documents for its own bundled JSON schema: a
path that resolves correctly under mix run but points at a directory
that never exists in the runtime image).
Baking file content into the .beam at compile time sidesteps the
packaging question entirely — the data travels with the module no matter
how the release is assembled, and callers no longer need :code.priv_dir/1
at all. @external_resource on every bundled file makes mix compile
recompile this module whenever a plan file changes, so the dev workflow
(edit .jsonld, mix test) still works exactly as before.
Every getter returns the exact raw file bytes (not a decoded/re-encoded term) — this module has no JSON dependency, and byte-for-byte content is what MCP resource reads have always served.
Summary
Functions
Raw JSON-LD text for a bundled domain file, e.g. "blocks_world.jsonld".
Same as domain/1, raising if file is not bundled.
File names of every bundled domain, e.g. ["blocks_world.jsonld", ...].
File names of every bundled problem's .notes.json sibling.
File names of every bundled problem, e.g. ["blocks_world_1a.jsonld", ...].
Raw JSON-LD text for a bundled problem file, e.g. "blocks_world_1a.jsonld".
Same as problem/1, raising if file is not bundled.
Raw JSON text for a bundled problem's sibling .notes.json file (human/
LLM-facing status metadata, not part of the planning document itself),
e.g. "work_queue.notes.json".
Functions
Raw JSON-LD text for a bundled domain file, e.g. "blocks_world.jsonld".
Same as domain/1, raising if file is not bundled.
@spec list_domains() :: [String.t()]
File names of every bundled domain, e.g. ["blocks_world.jsonld", ...].
@spec list_problem_notes() :: [String.t()]
File names of every bundled problem's .notes.json sibling.
@spec list_problems() :: [String.t()]
File names of every bundled problem, e.g. ["blocks_world_1a.jsonld", ...].
Raw JSON-LD text for a bundled problem file, e.g. "blocks_world_1a.jsonld".
Same as problem/1, raising if file is not bundled.
Raw JSON text for a bundled problem's sibling .notes.json file (human/
LLM-facing status metadata, not part of the planning document itself),
e.g. "work_queue.notes.json".