Skip to content

fix: block scalars in sequence items, and make /codecarto-next's flags discoverable - #216

Merged
TheAmericanMaker merged 2 commits into
mainfrom
fix/yaml-sequence-block-scalars
Sep 10, 2026
Merged

fix: block scalars in sequence items, and make /codecarto-next's flags discoverable#216
TheAmericanMaker merged 2 commits into
mainfrom
fix/yaml-sequence-block-scalars

Conversation

@TheAmericanMaker

Copy link
Copy Markdown
Member

Two changes from one report: an auto run that stopped after phase 1 without the user knowing why, and flags nobody could be expected to guess.

1. #211 was not actually finished

The fix shipped in 0.19.3 covered mapping values (key: >-) and not sequence items (- >-) — and the second is the shape an LLM reaches for when it writes a list of prose entries:

decisions:
  - >-
    The architecture map treats the legacy filesystem pipeline and the provider-neutral core as two
    separate subsystems with a one-directional dependency…

A real run hit it the same day 0.19.3 shipped. The architecture phase ran 25 turns and 73 tool uses, wrote a PASS WITH GAPS artifact — validation confirms PASS WITH GAPS, 6 rows, no gaps, no errors — and then auto-completion died on:

Auto-complete failed on architecture: Invalid YAML indentation near: The architecture map treats the legacy filesystem pipeline…

So the phase stayed pending, the dashboard showed 0/7 with the artifact and token usage recorded beside it, and the auto run stopped one phase in. - |- was never supported either, so this is less a regression from #211 than a hole it left.

The block-scalar body reader is now one shared routine called by both the mapping and sequence paths, rather than logic inlined in one of them — that divergence is what caused this. Verified against the handoff that actually failed: 2 decisions, 4 carry-forward entries and 2 open questions now parse.

Four new tests cover sequence folding, sequence literals, chomping on sequence items, siblings surviving after a block item, and a block scalar nested in a sequence item's mapping.

2. The flags now explain themselves

--auto and --llm-steer are independent — one decides how many phases run, the other decides what prompt each gets — and the combination that suits most full runs was not guessable from a completion list of four bare flag names plus a description that listed the same four again.

  • Completions carry a sentence each. AutocompleteItem.description existed all along; every codecarto command was passing label === value and nothing else.
  • --strict is offered only once --auto is present, instead of suggesting the one combination the parser rejects.
  • /codecarto-init names the full-run command, at the moment someone needs it.
  • The Pi guide addendum documents all four flags with a table of the four sensible invocations, tells the agent to volunteer that command after an init rather than wait to be asked, and pre-empts two things that read as failures and are not: the first phase is never steered (no closeout to steer from), and a stopped auto run explains itself in its summary block rather than in the phase result.

No default changed. --auto runs the whole pipeline unattended and spends real money; making it implicit would be a worse surprise than an undiscoverable flag.

Live check

Asked "I just ran /codecarto-init. What now?" after reading the framed guide, the model now answers:

  • /codecarto-next --auto --llm-steer — runs every remaining phase back to back, with each phase's prompt rewritten from the previous phase's closeout. This is the usual choice for a full run…
  • The first phase won't be steered (there's no previous closeout yet), so LLM rewriter skipped (no previous phase to steer from) is normal, not an error.

npm run build clean, 688/688 tests pass.

🤖 Generated with Claude Code

James Sesler and others added 2 commits September 10, 2026 14:14
#211's fix landed on mapping values (`key: >-`) and not on sequence items
(`- >-`), and the second is the shape an LLM reaches for when writing a list of
prose entries — a `decisions:` list with one folded entry per decision.

A real run hit it the same day 0.19.3 shipped. The architecture phase ran 25
turns and 73 tool uses, wrote a PASS WITH GAPS artifact, and auto-completion
then died on `Invalid YAML indentation near: The architecture map treats the
legacy filesystem pipeline…`. The phase stayed pending, the dashboard showed
0/7 with the artifact and token usage recorded beside it, and the auto run
stopped one phase in. `- |-` was never supported either, so this is less a
regression from #211 than a hole it left.

The block-scalar body reader is now one shared routine called by both the
mapping and sequence paths, rather than logic inlined in one of them, so the
two cannot diverge again. Verified against the handoff that actually failed:
2 decisions, 4 carry_forward entries and 2 open questions now parse.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
--auto and --llm-steer are independent — one decides how many phases run, the
other decides what prompt each gets — and the combination that suits most full
runs, --auto --llm-steer, was not guessable. The completion list showed four
bare flag names, and the command description listed the same four again.

Completions now carry a sentence each; AutocompleteItem.description existed all
along and every codecarto command was passing label === value and nothing else.
--strict is offered only once --auto is present, rather than suggesting the one
combination the parser rejects. /codecarto-init names the full-run command at
the moment someone needs it.

The Pi guide addendum documents all four flags with a table of the four sensible
invocations, and tells the agent to volunteer that command after an init instead
of waiting to be asked. It also pre-empts two things that read as failures and
are not: the first phase is never steered because there is no closeout to steer
from, and a stopped auto run explains itself in its summary block rather than in
the phase result.

Verified live: asked "I just ran /codecarto-init. What now?", the model now
leads with /codecarto-next --auto --llm-steer, explains what steering buys, and
volunteers that the first-phase skip message is normal.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@TheAmericanMaker
TheAmericanMaker merged commit aa84cf7 into main Sep 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant