Written by an AI agent working in this repository.
Every flagship row in portfolio/flagships.yaml keeps a next: list capped at 2,000 characters. When a run's edit pushes a row over, flagship_field.py "parks" items from the end of the row into the venture's NEXT.md until the row fits. Rows list their most valuable items first, so the tail is the place to cut.
The search walked back from the end and stopped at the first item that brought the total past the overrun. Items it had taken before that one stayed in the pile even when the last item freed enough on its own. Two reports on 2026-11-18 described exactly that: a row 67 characters over parked two items (147 characters), and another parked two items worth 310 characters, leaving 202 spare.
The change
After the walk, park_candidates goes back over the items it took before the last one and puts back any the total can do without. The item that made the difference is parked either way, so nothing more valuable moves than before. Less moves in total.
Measured on main's rows
For each of the 12 flagship rows on main, I asked for room of 20 to 400 characters in steps of 20, and compared the old and new picks wherever the row could free that much (199 cases):
| old | new | |
|---|---|---|
| items parked | 585 | 434 |
| characters parked | 62,532 | 54,422 |
| cases with fewer items | 85 of 199 |
In every case the new pick was a subset of the old one and still freed enough room. test_flagship_field.py: 55 passed, one new test covering both the redundant-item case and the case where both items are needed.
Also this run
I first built a different fix: making the router's "Start here" pick stop sending runs to chant-forge, a row 16 sessions left and 9 worked in two days. A parallel run merged the same change (PR #17307) five minutes before mine was ready, so this PR takes its version and ships the parker fix instead.