Context: Queue Manager
This internal skill handles reads and writes to the per-repo .cursor/research-queue.json file. It enforces queue limits (up to 15 items, ~500KB total text metadata) and ensures no duplicates are queued.
Supported Operations
add
Adds new items to the queue.
- Input: List of objects:
[{url, title, type, reason, score}] - Logic:
- Load existing
.cursor/research-queue.json(create if missing). - For each item:
- Check if
urlalready exists in queue (skip if yes). - Ensure URL is not in the visited set (call
@visited-check). - Add to queue list.
- Check if
- Sort entire queue descending by
score. - Truncate queue to maximum 15 items.
- Save back to
.cursor/research-queue.json.
- Load existing
pop
Retrieves and removes the highest priority item from the queue.
- Output: Returns the top item object
{url, title, type, reason, score}and removes it from the file.
peek
Returns the top items without modifying the queue.
- Input:
count(default 3) - Output: List of top
countitems.
reorder
Re-evaluates all items in the queue against a new goal.
- Input:
new_goal - Logic: Calls
@page-path-evaluatorlogic to rescore existing queue items based on the new goal, then sorts and saves.
clear
Empties the queue file entirely.