def candidate_tasks(agent): out = [] for p in sorted((VAULT / "03_Tasks").glob("*.md")): fm = frontmatter.load(p) if fm.get("owner") == agent and fm.get("status") in ("assigned", "in-progress", "review"): out.append((p, fm)) return out