Run summary

From adrianco/retort · View interactive version

Run summary is an AI agent skill from the GitHub repository adrianco/retort. Summarize the architecture of code generated by a single retort run. Produces module-level structure, interfaces, and control flow in a form suitable for cross-run comparison — not a full codebase-summary.

How to use this skill

Skill file

Run Summary

Overview

Retort runs produce small, single-task codebases (one REST API, one CLI, one service). Full codebase-summary treatment is overkill — but a consistent lightweight summary per run is exactly what makes cross-run comparison useful.

This skill is an intentionally scoped-down adaptation of pourpoise's codebase-summary. It runs in seconds, not minutes, and emits only what's useful when comparing 48+ small generated projects.

Parameters

Steps

1. Infer the surface

Read TASK.md to understand what the code is supposed to do — the "surface" of the project. One paragraph, no judgments.

2. Map the modules

Generate {output_dir}/modules.md:

# Modules

| Path | Purpose | Entry points |
|------|---------|--------------|
| src/app.py | HTTP server, route handlers | `app`, `create_app()` |
| src/models.py | SQLAlchemy models | `Book`, `Base` |
| src/db.py | Connection + migrations | `get_engine()` |
| tests/test_app.py | API integration tests | 8 test functions |

Constraints:

3. Describe the interfaces

Generate {output_dir}/interfaces.md covering what the code exposes:

Example:

# Interfaces

## HTTP routes

| Method | Path | Returns | Handler |
|--------|------|---------|---------|
| GET | /books | `[Book]` | `app.py:list_books` |
| POST | /books | `Book` | `app.py:create_book` |
| GET | /books/{id} | `Book \| 404` | `app.py:get_book` |

## Data schema

`books` table: id (int, pk), title (str), author (str), year (int).

Constraints:

4. Trace the dominant control flow

Generate {output_dir}/flow.md with one Mermaid diagram showing the happy-path request/response for the main feature, plus a one-paragraph narration.

# Flow

sequenceDiagram

Client->>app.py: GET /books

app.py->>db.py: get_session()

db.py-->>app.py: Session

app.py->>Book: query.all()

Book-->>app.py: [Book]

app.py-->>Client: 200 {json}


A request to `GET /books` opens a DB session via `db.py:get_session()`, queries all `Book` rows, and returns them as JSON. No pagination, no filtering.

Constraints:

5. Write the index

Generate {output_dir}/index.md linking to the other three files and giving a 3–4 bullet summary:

# Summary: {cell_name} · rep {replicate}

- **Shape:** {one-line description — "Flask REST API with SQLAlchemy", "Go net/http CRUD with in-memory store", etc.}
- **Structure:** {n} modules, {n} test files
- **Interfaces:** {n} HTTP routes / {n} CLI commands / {n} exported functions
- **Notable:** {what stands out — simplest/most-complex approach seen, unusual library choice, etc.}

See [modules.md](modules.md), [interfaces.md](interfaces.md), [flow.md](flow.md).

Constraints Summary

Troubleshooting

Code is unparseable / generated output is garbage

Too many files to summarize

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.