feat(focus-area): use enriched descriptions in cluster output

cluster_tasks now attaches enriched_description to each task dict.
focus-area reads enriched_description (falling back to raw content) when
building the area summary, so the orchestrator sees the expanded 3-sentence
descriptions instead of terse raw titles.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-12 14:58:31 +00:00
parent f6b89fc849
commit f66f337779
2 changed files with 15 additions and 5 deletions

View File

@@ -45,11 +45,16 @@ class FocusAreaAgent(BaseAgent):
lines = [f"The user's tasks are grouped into {len(clusters)} area(s):"]
for i, cluster in enumerate(clusters, 1):
titles = [t.get("content", "").strip() for t in cluster.tasks if t.get("content")]
titles_str = "; ".join(f'"{t}"' for t in titles[:8])
if len(titles) > 8:
titles_str += f" (and {len(titles) - 8} more)"
lines.append(f"{i}. {cluster.label}{cluster.task_count} task(s): {titles_str}")
descs = [
t.get("enriched_description") or t.get("content", "")
for t in cluster.tasks
if t.get("content")
]
descs = [d.strip() for d in descs if d.strip()]
descs_str = "; ".join(f'"{d}"' for d in descs[:8])
if len(descs) > 8:
descs_str += f" (and {len(descs) - 8} more)"
lines.append(f"{i}. {cluster.label}{cluster.task_count} task(s): {descs_str}")
lines.append("(Task titles may be in any language — always write the tip in English.)")