Extend update command error handling and update documentation

- Extend safe_cli_wrapper() to suppress spurious Click errors for both
  install and update commands; add success indicators for update output
- Add test_update_command_error_suppression to verify error suppression
- Expand CLAUDE.md to document all 17 agents with categories
- Add Keep a Contributing-File format header to CONTRIBUTING.md
- Fix TodoFileGuide URL reference in TODO.md
- Add RELEASE_NOTES_v1.0.1.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 09:02:04 +01:00
parent 167222d45b
commit 3858141ce6
6 changed files with 281 additions and 41 deletions

View File

@@ -37,6 +37,26 @@ class TestClickWorkaround:
assert "Got unexpected extra argument" not in stdout_content
assert "Got unexpected extra argument" not in stderr_content
def test_update_command_error_suppression(self):
"""Test that spurious 'unexpected extra argument' errors are suppressed for update commands."""
# Test the update command that also shows spurious errors
with patch('sys.argv', ['kaizen-agentic', 'update']):
with patch('sys.stdout', new_callable=StringIO) as mock_stdout:
with patch('sys.stderr', new_callable=StringIO) as mock_stderr:
try:
safe_cli_wrapper()
except SystemExit:
pass # Expected for CLI commands
stdout_content = mock_stdout.getvalue()
stderr_content = mock_stderr.getvalue()
# Should show update message
assert "Updating all installed agents:" in stdout_content
# Should NOT show spurious error message
assert "Got unexpected extra argument" not in stdout_content
assert "Got unexpected extra argument" not in stderr_content
def test_non_install_command_normal_operation(self):
"""Test that non-install commands work normally without interference."""
with patch('sys.argv', ['kaizen-agentic', 'list']):