promptdojo_

Write plan_context(tokens_avail, items) that decides which items to load into context now and which to offload (filesystem / RAG / fetch-on-demand). Returns a dict:

{"loaded": [<item names>], "offloaded": [<item names>]}

Rules:

  • Each item is a dict with name (str), tokens (int), and priority (int — higher = more important).
  • Sort items by priority descending. Ties broken by name ascending (alphabetical, for stable ordering).
  • Greedily load items in that order until the next item would exceed tokens_avail. Anything that doesn't fit goes to offloaded.
  • Do NOT mutate the input list.

Six items, 4000-token budget. Expected output:

loaded: ['claude_md', 'current_task', 'recent_tool_results', 'deploy_skill']
offloaded: ['session_history', 'rust_skill']

this step needs the editor

on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.

open this same url on a laptop to keep going today.