Skip to content

Show graph stats summary when watch generates initial files #51

@greynewell

Description

@greynewell

Problem

When supermodel watch starts and generates the initial .graph files, it emits [files] watching… and nothing else. The user never sees what was found. This is the "wow" moment — it's already earned by the time the API returns, but we're throwing it away.

Solution

After the initial generate on startup, print a human-readable summary of what was mapped:

```
✓ Mapped 847 files — 12,340 functions, 4 circular deps, 23 dead functions
```

This is the number people screenshot and post on X. The data is all available from the SidecarIR — nodes, relationships, and the graph structure to detect circular deps and dead code.

Implementation notes

  • The daemon's loadOrGenerate path already has the IR in memory after the initial fetch
  • Add a summarize(ir *api.SidecarIR) helper that counts: source files, functions, circular deps (nodes in cycles), dead functions (nodes with no callers)
  • Print the summary line after the first successful generate, before entering the watch loop
  • Also print it after incremental updates (shorter form: ✓ Updated — 847 files mapped)

Why this matters

It's the first visible proof the product is working. Without it, users see a running process with no output and assume something is wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions