Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# AGENTS.md

This repository uses the development workflow described in `CLAUDE.md`. When making code changes you should:

* Install dependencies with `pip install -e ".[dev]"`.
* Format code with **Black** and ensure it passes in check mode.
* Lint using **ruff**.
* Type check using **mypy**.
* Run the unit tests with `pytest`.

All of these checks must succeed before committing.

The project is an AI‑powered bookmark cleanup tool for Raindrop.io built with a modular architecture. The main modules include:

* `api/raindrop_client.py` for Raindrop API access
* `ai/claude_analyzer.py` for Claude AI integration
* `ui/interfaces.py` for keyboard and text interfaces
* `state/manager.py` for persistence of session state
* `cli/main.py` for the command‑line interface

The test suite under `tests/` uses pytest with extensive mocking of external services.
4 changes: 1 addition & 3 deletions raindrop_cleanup/ui/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,7 @@ def _display_text_interface(
return []
elif user_input == "all":
return [
i
for i, d in enumerate(decisions)
if d.get("action") != "KEEP"
i for i, d in enumerate(decisions) if d.get("action") != "KEEP"
]
elif user_input == "deletes":
return [
Expand Down
7 changes: 4 additions & 3 deletions tests/unit/test_cli_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,10 @@ def test_debug_environment_variable(self, mock_input, mock_cleaner, mock_getenv)
@patch("builtins.print")
def test_missing_env_vars_precheck(self, mock_print):
"""CLI should exit early when required env vars are missing."""
with patch.dict(os.environ, {}, clear=True), patch(
"raindrop_cleanup.cli.main.RaindropBookmarkCleaner"
) as mock_cleaner:
with (
patch.dict(os.environ, {}, clear=True),
patch("raindrop_cleanup.cli.main.RaindropBookmarkCleaner") as mock_cleaner,
):
main()

mock_cleaner.assert_not_called()
Expand Down