Skip to content

fix(cli): charter new "Next steps" output renumbers when origin set (cli-3.6.1)#69

Merged
montfort merged 1 commit into
mainfrom
fix/charter-new-next-steps-numbering
May 2, 2026
Merged

fix(cli): charter new "Next steps" output renumbers when origin set (cli-3.6.1)#69
montfort merged 1 commit into
mainfrom
fix/charter-new-next-steps-numbering

Conversation

@montfort
Copy link
Copy Markdown
Contributor

@montfort montfort commented May 2, 2026

Summary

  • devtrail charter new output skipped from step 2. to step 4. when --from-ailog or --from-spec was passed. Hardcoded numbering didn't re-sequence after the conditional origin-step was suppressed.
  • Fix: extract next_steps(from_ailog, from_spec) -> Vec<String> and apply dynamic numbering via enumerate(). Four unit tests cover the three origin paths and guard against regression.
  • First CLI patch driven directly by an empirical Charter-execution finding — reported as F1 of Sentinel AILOG-2026-05-02-028 during the first end-to-end execution of CHARTER-01 (format v4 atomic Charter closure pattern).

Test plan

  • CI: release-cli.yml builds 4 platforms on tag push.
  • Manual: devtrail charter new --type S --title "test" --from-ailog AILOG-2026-04-28-021 (in any repo with a matching AILOG) shows steps numbered 1. 2. 3. (not 1. 2. 4.).
  • cargo test: 4 new unit tests + existing 209 unchanged.

Post-merge

git tag cli-3.6.1 && git push origin cli-3.6.1

🤖 Generated with Claude Code

…cli-3.6.1)

`devtrail charter new` output skipped from step 2 to step 4 when
--from-ailog or --from-spec was passed. The conditional origin-step
(step 3 in the no-origin path) was suppressed correctly, but the
remaining steps had hardcoded numbers that did not re-sequence.

Reported as F1 of AILOG-2026-05-02-028 in Sentinel during the first
end-to-end execution of CHARTER-01 (format v4 atomic Charter closure
pattern).

Fix: extract the step list into a pure function next_steps that builds
steps as data and applies dynamic numbering via enumerate(). Four unit
tests verify behavior across the three origin paths (no flag,
--from-ailog, --from-spec) and guard against regression to the
hardcoded form.

Editorial/cosmetic fix. No schema changes. No behavior change beyond
the printed output. cli-3.6.0 Charters are unaffected.

First CLI patch driven directly by an empirical Charter-execution
finding. Validates the disposition rule from CHARTER-01 of Sentinel:
bug-class frictions with obvious fix paths flow upstream as patches
without ceremony, while observation-class frictions accumulate in the
AILOG until 3+ patterns emerge.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@montfort montfort merged commit ab77064 into main May 2, 2026
@montfort montfort deleted the fix/charter-new-next-steps-numbering branch May 2, 2026 19:18
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