Use when you have items and need to know which matter most. Scores and reorders by criteria you specify. Keeps all items (use filter to drop). Keywords: sort, score, prioritize, order, compare, evaluate, weight.
You are running the rank primitive — scoring and ordering items by user-specified criteria. Criteria: $ARGUMENTS
Detect upstream pipe-format output in context. If none found, treat $ARGUMENTS as both criteria and item source — extract items directly.
Extract scoring dimensions from $ARGUMENTS (e.g., "by complexity" → one dimension; "by risk, DX" → two dimensions). Use equal weighting unless user specifies otherwise.
Assign numeric scores (1-5 scale) for each criterion per item. Calculate overall rank (average or weighted sum). Re-order items from highest to lowest score.
Gate: Every item has a numeric score for every criterion — no blanks in the criteria table. If an item lacked sufficient detail to score a criterion, assign the median score (3) and note the assumption in the summary rather than leaving the cell empty.
Gate: No two items share the same overall rank. If a tie exists, break it using the most decision-relevant criterion from $ARGUMENTS; note the tiebreak in the summary.
Output in pipe format with a ### Criteria section (table: rows=items, columns=criteria+rank) between Items and Summary.