Skip to content

Add deepwork rules clear_queue command for queue management#117

Merged
nhorton merged 1 commit intomainfrom
claude/add-clear-queue-command-F9kQN
Jan 22, 2026
Merged

Add deepwork rules clear_queue command for queue management#117
nhorton merged 1 commit intomainfrom
claude/add-clear-queue-command-F9kQN

Conversation

@nhorton
Copy link
Contributor

@nhorton nhorton commented Jan 22, 2026

Summary

Introduces a new CLI command deepwork rules clear_queue to replace manual file deletion commands for clearing the rules queue. This improves usability and provides a cleaner interface for queue management.

Changes

  • New CLI command: Added deepwork rules clear_queue subcommand under a new rules command group

    • Clears all JSON entries from .deepwork/tmp/rules/queue/
    • Provides user-friendly feedback (shows count of cleared entries or "already empty" message)
    • Implemented in new src/deepwork/cli/rules.py module
  • Updated documentation: Replaced all instances of manual queue clearing commands

    • Changed rm -rf .deepwork/tmp/rules/queue/*.json to deepwork rules clear_queue in:
      • .claude/settings.json (deepwork_rules.define hook)
      • .deepwork/jobs/manual_tests/steps/run_fire_tests.md
      • .deepwork/jobs/manual_tests/steps/run_not_fire_tests.md
    • Updated explanatory comments to reference the new command
  • CLI integration: Registered new rules command group in main CLI entry point

Implementation Details

  • Uses existing RulesQueue class from deepwork.core.rules_queue for queue operations
  • Provides colored console output using Rich library for better UX
  • Returns count of cleared entries for transparency
  • Handles empty queue gracefully with appropriate messaging

- Create new `deepwork rules clear_queue` command that clears all entries
  from .deepwork/tmp/rules/queue/
- Replace rm -rf bash commands with the new CLI utility in settings.json
  permissions and manual_tests job documentation
- Provides a cleaner, more user-friendly way to reset the rules queue
  between tests or after manual verification
@nhorton nhorton merged commit bfed849 into main Jan 22, 2026
4 checks passed
@nhorton nhorton deleted the claude/add-clear-queue-command-F9kQN branch January 22, 2026 20:15
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.

2 participants