docs(cli): list kiro in update target help#1821
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates apm update --help text to include the newly supported kiro target and adds a regression test to ensure the help output stays aligned with supported targets.
Changes:
- Add a unit test asserting
apm update --helpincludeskiroand shows a--targetexample. - Update
updatecommand documentation/help strings to listkiroamong target examples.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/unit/test_update_command.py | Adds a regression test to lock in --help output mentioning kiro and a --target usage example. |
| src/apm_cli/commands/update.py | Updates user-facing help text/documentation to include kiro in the target examples. |
| def test_dependency_update_help_lists_kiro_target_example(self): | ||
| """`apm update --help` should keep target examples aligned with supported targets.""" | ||
| result = self.runner.invoke(cli, ["update", "--help"]) | ||
|
|
||
| self.assertEqual(result.exit_code, 0) | ||
| self.assertIn("gemini, kiro", result.output) | ||
| self.assertIn("--target claude,cursor", result.output) |
There was a problem hiding this comment.
Addressed in 8b06e49: the test now collects the --target help block and asserts --target, gemini, and kiro independently instead of matching a specific example/order. Validated with targeted pytest, ruff check, ruff format --check, and git diff --check.
4922368 to
035790d
Compare
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python Architect | 0 | 0 | 2 | Correct, minimal, no-risk fix closing the consistency gap with install, compile, and deps; two nits on DRY gap and test complexity. |
| CLI Logging Expert | 0 | 0 | 2 | No required findings; two nits on test naming and example ordering consistency. |
| DevX UX Expert | 0 | 1 | 1 | update --target example list is out of sync with install --target in ordering and content; minor test complexity nit. |
| Supply Chain Security Expert | 0 | 0 | 0 | No supply-chain security surface touched; help text change only, no new dependencies or auth paths. |
| OSS Growth Hacker | 0 | 0 | 1 | No blocking growth issues; one process nit around help-string consistency for new target additions. |
| Doc Writer | 0 | 1 | 1 | Two doc-consistency issues: --target example order diverges from the reference page, and the fix lacks a CHANGELOG entry. |
| Test Coverage Expert | 0 | 0 | 1 | New test correctly covers the kiro addition; one nit on brittle multi-line parser and trivially true assertion. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 5 follow-ups
- [Doc Writer] Add a CHANGELOG
[Unreleased]### Fixedentry for this help-text fix. -- Project convention requires a### Fixedbullet for every user-visible behavior change; the omission breaks the audit trail and is a one-line fix:- \apm update --target` help text now lists `kiro` as a valid example target, matching `apm install`. (docs(cli): list kiro in update target help #1821)` - [DevX UX Expert] Reorder the --target example list in update.py to match the CLI reference page order:
claude, copilot, cursor, windsurf, kiro, codex, opencode, gemini. -- After this PR, update and install list targets in divergent orders, and the in-binary help disagrees withdocs/src/content/docs/reference/cli/update.mdline 46; divergent ordering compounds with each new target addition and erodes first-run confidence. - [OSS Growth Hacker] Add an "adding a new target" checklist item to CONTRIBUTING.md requiring help-string example consistency and canonical ordering across all command files. -- At least the second PR where a new target shipped without aligned example strings across all commands; a CONTRIBUTING.md gate prevents the cycle from repeating.
- [Python Architect] Extract a shared
_TARGET_HELP_EXAMPLESconstant intargets.pyso all five command files reference a single source of truth for --target example strings. -- Five independently maintained strings guarantee drift on every new target addition; a dedicated refactor PR can update all five commands together. - [Test Coverage Expert] Simplify the new test to
self.assertIn("kiro", result.output)and drop the multi-line --target section collector. -- The collector is sensitive to Click's terminal-width formatting and includes a trivially true assertion (assertIn("--target", target_help)); a direct assertIn on result.output is equally precise and more robust.
Architecture
classDiagram
direction LR
class update_module {
<<Module>>
+module_docstring str
+update() Click.Command
}
class update {
<<Command>>
+packages tuple
+target list
+assume_yes bool
+dry_run bool
+verbose bool
}
class _UpdateRunState {
<<Dataclass>>
+plan UpdatePlan
+proceeded bool
+revision_pins_applied bool
}
class TargetParamType {
<<Converter>>
+convert(value, param, ctx) list
}
class TargetProfile {
<<ValueObject>>
+name str
+root_dir str
+primitives dict
}
class targets_module {
<<Module>>
+TARGET_PROFILES dict
}
class TestUpdateCommand {
<<TestCase>>
+runner CliRunner
+test_update_kiro_in_help()
}
update_module *-- update : defines
update *-- _UpdateRunState : creates
update ..> TargetParamType : target option
TargetParamType ..> targets_module : validates against
targets_module *-- TargetProfile : kiro entry
TestUpdateCommand ..> update_module : invokes via CliRunner
class update_module:::touched
class TestUpdateCommand:::touched
classDef touched fill:#fff3b0,stroke:#d47600
flowchart TD
A["CLI: apm update --help"] --> B["Click router\napm_cli/cli.py"]
B --> C["update() command\ncommands/update.py"]
C --> D["Click emits help text\nfrom --target option\nhelp= string literal"]
D --> E["Help string now includes\n'...gemini, kiro.'\nupdate.py lines 42 and 254"]
E --> F["CliRunner.invoke captures stdout\ntest_update_command.py"]
F --> G["Multi-line parser collects\n-t, --target block"]
G --> H{"assertIn checks"}
H --> |"assertIn 'gemini'"| I["PASS"]
H --> |"assertIn 'kiro'"| I
H --> |"either missing"| J["FAIL / regression"]
style E fill:#fff3b0,stroke:#d47600
style G fill:#fff3b0,stroke:#d47600
Recommendation
The fix is correct and the contribution is welcome. Items 1 and 2 (CHANGELOG entry and target ordering) are small enough that the maintainer may choose to ask the author for an in-PR amendment or fold them in directly; either path is fine. Items 3 through 5 belong in follow-up issues rather than holding up this PR. Once the CHANGELOG and ordering are addressed -- however the maintainer prefers to handle them -- this change is ready to land.
Full per-persona findings
Python Architect
-
[nit] Design patterns / pre-existing DRY gap in --target example strings at
src/apm_cli/commands/update.py:254
Five command files (install.py, update.py, compile/cli.py, deps/cli.py, _helpers.py) maintain independently-edited --target example strings. A shared_TARGET_HELP_EXAMPLESconstant extracted to targets.py would make future target additions a single-line change instead of a five-file grep.
Suggested: Extract shared target example string to targets.py or a shared constants module; reference it from all commandhelp=arguments. -
[nit] Test name is verbose; line-scanning loop is defensible but text-layout-sensitive at
tests/unit/test_update_command.py:259
test_dependency_update_help_lists_kiro_target_exampleis wordy. The line-scan loop is sensitive to Click'smax_content_widthand terminal width.self.assertIn("kiro", result.output)is equally precise and far easier to read.
Suggested: Rename totest_update_target_help_includes_kiro. Optionally simplify toself.assertIn("kiro", result.output).
CLI Logging Expert
-
[nit] Test method name implies
apm deps updatescope, notapm updateattests/unit/test_update_command.py:259
The prefixtest_dependency_update_*mirrors thedeps updatesub-command naming convention used elsewhere; a reader scanning forapm updatehelp tests will overlook this.
Suggested: Rename totest_update_help_lists_kiro_as_target_example. -
[nit]
--targetexample list order in help text diverges fromCANONICAL_TARGETS_ORDEREDatsrc/apm_cli/commands/update.py:254
When the canonical order and the help-text example order drift, future additions will replicate the inconsistency. Keeping both in sync is the low-effort way to prevent drift from compounding.
Suggested: Reorder the example to matchCANONICAL_TARGETS_ORDEREDintarget_detection.py, insertingkiroat the same relative position.
DevX UX Expert
-
[recommended]
update --targetexample list diverges frominstall --targetin ordering and content atsrc/apm_cli/commands/update.py:254
After this PR, update examples enumerateclaude, copilot, cursor, windsurf, codex, opencode, gemini, kirowhile install lists targets in a different order and includesantigravityandagent-skills. Sibling commands with divergent target lists force users to wonder which list is authoritative -- exactly the doubt that kills first-run confidence.
Suggested: Extract a sharedSUPPORTED_TARGETSconstant and reference it in both install and update help text so the lists stay in sync automatically. -
[nit] Multi-line output collector in test adds indirection without stronger coverage at
tests/unit/test_update_command.py:262
self.assertIn("kiro", result.output)is equally precise and immediately readable; the multi-line collector pattern adds cognitive overhead without catching any additional failure modes.
Supply Chain Security Expert
No findings.
OSS Growth Hacker
- [nit] No checklist gate for consistent help-string examples when adding a new target at
CONTRIBUTING.md
This is at least the second PR where a new target shipped without short-example strings aligned across all commands. Help strings are a micro-conversion surface -- a user who sees the tool in one command but not another reasonably doubts whether support exists.
Suggested: Add one checklist item to the "adding a new target" section (or the PR template): "[ ] All commands that accept a target include a short --help example using the new target name."
Auth Expert -- inactive
No auth files in diff; help-text-only change does not touch authentication behavior, token management, credential resolution, or host classification.
Doc Writer
-
[nit]
update.pyhelp text appendskiroaftergemini, contradicting the documented order on the CLI reference page atsrc/apm_cli/commands/update.py:42
The reference page atdocs/src/content/docs/reference/cli/update.md(line 46) positionskirobetweenwindsurfandcodex. When the in-binary help text and the docs site disagree on ordering, users who cross-reference the two get inconsistent mental models.
Suggested: Reorder to:claude, copilot, cursor, windsurf, kiro, codex, opencode, gemini-- matching the reference page order. -
[recommended] No CHANGELOG entry covers the
--targethelp-text fix forkiroatCHANGELOG.md
Project convention requires a### Fixedbullet for every notable fix in[Unreleased]. The kiro target itself was introduced in v0.20.0 with a proper entry; leaving this undocumented breaks the audit trail.
Suggested: Add to[Unreleased]under### Fixed:- \apm update --target` help text now lists `kiro` as a valid example target, matching `apm install`. (docs(cli): list kiro in update target help #1821)`
Test Coverage Expert
- [nit] Multi-line --target section parser is brittle; one assertion is trivially true at
tests/unit/test_update_command.py
The collector loop breaks onstripped.startswith("-") and not stripped.startswith("--target")-- sensitive to Click's default 80-column layout.self.assertIn("--target", target_help)is trivially true since the first element appended is always the line starting with-t, --target. The load-bearing assertion isassertIn("kiro", target_help). Simpler and equally robust:self.assertIn("kiro", result.output)paired withself.assertIn("gemini", result.output).
Proof (passed):tests/unit/test_update_command.py::TestUpdateCommandLogic::test_dependency_update_help_lists_kiro_target_example-- proves:apm update --helplists kiro as a valid --target example [devx]
Performance Expert -- inactive
No performance-relevant files in diff; help-text-only change does not affect dependency download, cache, transport, parallelism, or install/update wall-time.
This panel is advisory. It does not block merge. Re-apply the panel-review label after addressing feedback to re-run.
Generated by PR Review Panel for issue #1821 · sonnet46 10.6M · ◷
|
Thanks for the review-panel pass. I pushed a small follow-up in
Local validation on Windows / Python 3.12: |
Summary
kiroto theapm update --targethelp example listContext
Follow-up for #1817, item 3 in the CLI Consistency Report.
kirois supported by the target parser and documented in the CLI reference, but theapm update --targethelp examples still omitted it.Testing
.venv-codex/bin/python -m pytest tests/unit/test_update_command.py -q.venv-codex/bin/ruff check src/apm_cli/commands/update.py tests/unit/test_update_command.py.venv-codex/bin/apm update --help | rg -n 'Agent target|kiro|--target|claude,cursor'