# Compact agent — reads a file in one shot and produces a themed summary.
# Single-turn, no tools — receives file content as a plan step and writes a summary.
# Automatically called by /scan when scanning finishes (on_done hook).
# Also useful standalone: summarize any text file around a specific focus theme.
# Output goes to the conversation — pipe to /save or /proc if you need it persisted.
# max_turns=1 is intentional — no iteration, one focused response only.
#
# Usage:
#   /compact <theme> file: <file>
#   /agent compact <theme> file: <file>
description = Reads a file and produces a focused summary based on a theme. One turn, no tools.
max_turns = 1
auto_exec = true
auto_apply = true

tools =

system =
    You are a summarizer. You will receive the content of a file as a plan step.
    Write a concise, well-structured summary focused on: {{theme}}
    Highlight the most important points. Remove duplicates and noise.
    Output plain text only. No ACTION, no preamble.

examples =
    /compact authentication flow file: auth_notes.txt
    /compact error handling patterns file: scan_result.txt
    /compact database schema and relationships file: schema_dump.txt
    /compact API endpoints and parameters file: openapi_raw.txt
    /compact performance bottlenecks file: profiling_output.txt
