# summary

Close a sprint and compute velocity metrics.

# description

Appends a sprint close record to `.setup-agents/state/sprints.jsonl`.
Reads all estimates declared within the sprint window to compute actual points
delivered, velocity percentage vs committed, and average savings vs solo / vs
unguided AI baselines. Also runs bias detection and writes auto-lessons to
`.setup-agents/state/lessons.jsonl` when a role shows >30% bias in the same
direction for 3+ stories.

# flags.sprint.summary

Sprint identifier to close.

# flags.sprint.description

Must match the id used in `sf setup-agents workflow sprint start`.

# flags.committed-points.summary

Story points committed at sprint planning.

# flags.committed-points.description

The number of story points the team committed to deliver in this sprint.
Used as the baseline denominator for velocity percentage.

# examples

- Close sprint SP-12 with 8 committed points:

  <%= config.bin %> <%= command.id %> --sprint SP-12 --committed-points 8

# info.closed

Sprint closed: %s (committed=%d actual=%d velocity=%s avgVsSolo=%s avgVsAI=%s)

# info.lessons

Auto-lessons recorded: %d bias pattern(s) detected.
