IW-679: Shared subcommand runner for six commands #746
No reviewers
Labels
No labels
agent-ready
bug
contract
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-human
needs-input
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli!746
Loading…
Reference in a new issue
No description provided.
Delete branch "IW-679"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The six commands with subcommands —
service,server,config,gate,review-stateandissue— now run through one shared runner,core/commands/Subcommand.scala, in place of six hand-written copies of the same dispatch code. Behaviour does not change: help text, error messages and output stay the same.Changes
Subcommand[A]binds a subcommand declaration to its action with the same typeA.Subcommand.dispatchparses, prints help, rejects bad input and runs the action for all six commands.Subcommand.runParsedholds the parse/help/reject/act sequence for one declaration.DispatchOutcomeincore/modeltakes a type parameter, soToSubcommandreturns the binding itself. Theeqarms and the unreachableinternal: unexpected subcommandfallbacks are gone.subcommandslist and builds its parent declaration from it, so the help cannot list a subcommand that has no action.review-state writeandupdatekeep reading raw argv after parse (a recorded earlier decision); they use thereadingArgvform of the binding.Phase PR: #743. Review packet:
project-management/issues/IW-679/review-packet.md.Known differences kept on purpose
iw review-state --bogusstill reportsMissing subcommand, while the other dispatchers reportUnknown flag. Filed in #744.Follow-ups filed
Subcommand.runParsedholds.Testing
core/test(SubcommandTestplus harness tests per command); CI ran the full suite on the phase PR #743.Release notes (CZ)
Tato změna je čistě vnitřní úprava nástroje iw-cli a pro uživatele nepřináší žádnou novou funkci ani viditelnou změnu chování. Příkazy
service,server,config,gate,review-stateaissuese ovládají přesně stejně jako dosud; nyní ale sdílejí jedno společné místo pro zpracování podpříkazů. Vizproject-management/issues/IW-679/release-notes.md.🤖 Generated with Claude Code
Closes #679
Issue: IW-679 Phase: 1 - Shared subcommand runner + migrate six commands This commit marks the checkpoint for phase 1 context generation. Use wf-implement IW-679 to return to this point. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Shared subcommand runner + migrate six commands Artifacts: - phase-01-tasks.md 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>There are conflicts after merging other branches.
Implement: rework for review 17
The rework phase merged into IW-679 through #751; this pull request carries it.