refactor(aggregate): remove deprecated build_tier1_context and build_tier2_context

This commit is contained in:
2026-05-09 17:44:15 -04:00
parent 5160287047
commit c4a738c8ba
3 changed files with 3 additions and 88 deletions
-44
View File
@@ -281,50 +281,6 @@ def build_discussion_text(history: list[str]) -> str:
return ""
return "## Discussion History\n\n" + build_discussion_section(history)
def build_tier1_context(file_items: list[dict[str, Any]], screenshot_base_dir: Path, screenshots: list[str], history: list[str]) -> str:
"""
Tier 1 Context: Strategic/Orchestration.
Full content for core conductor files and files with tier=1, summaries for others.
[C: tests/test_aggregate_flags.py:test_auto_aggregate_skip, tests/test_aggregate_flags.py:test_force_full, tests/test_tiered_context.py:test_build_tier1_context_exists, tests/test_tiered_context.py:test_tiered_context_by_tier_field]
"""
core_files = {"product.md", "tech-stack.md", "workflow.md", "tracks.md"}
sections = []
for item in file_items:
if not item.get("auto_aggregate", True):
continue
path = item.get("path")
if not path: continue
entry = item.get("entry")
display_name = entry or str(path)
tier = item.get("tier")
force_full = item.get("force_full")
content = item.get("content", "")
if path.name in core_files or tier == 1 or force_full:
suffix = path.suffix.lstrip(".") if path.suffix else "text"
sections.append(f"### `{display_name}`\n\n```{suffix}\n{content}\n```")
else:
sections.append(f"### `{display_name}`\n\n{summarize.summarise_file(path, content)}")
parts = []
if sections:
parts.append("## Files (Tier 1 - Mixed)\n\n" + "\n\n---\n\n".join(sections))
if screenshots:
parts.append("## Screenshots\n\n" + build_screenshots_section(screenshot_base_dir, screenshots))
if history:
parts.append("## Discussion History\n\n" + build_discussion_section(history))
return "\n\n---\n\n".join(parts)
def build_tier2_context(file_items: list[dict[str, Any]], screenshot_base_dir: Path, screenshots: list[str], history: list[str]) -> str:
"""
Tier 2 Context: Architectural/Tech Lead.
Full content for all files (standard behavior).
[C: tests/test_tiered_context.py:test_build_tier2_context_exists]
"""
return build_markdown_from_items(file_items, screenshot_base_dir, screenshots, history, summary_only=False)
def build_tier3_context(file_items: list[dict[str, Any]], screenshot_base_dir: Path, screenshots: list[str], history: list[str], focus_files: list[str]) -> str:
"""