Claude Prompt
/devlyn:resolve "Add a run-budget feature to the `schedule` library (this repository).\n\nImplement `Job.max_runs(n)`:\n\n- Chainable setter that returns the Job instance, usable anywhere in the\n fluent chain, e.g. `schedule.every(5).seconds.max_runs(3).do(job_fn)` or\n `schedule.every().max_runs(3).seconds.do(job_fn)`.\n- The budget counts actual executions of the job function. After the job\n has executed n times in total, the job removes itself from its scheduler\n exactly as a job returning `CancelJob` does. The nth execution itself\n still runs normally; an (n+1)-th execution must never happen.\n- Applies to every execution path that runs jobs through the scheduler\n (`run_pending()` and `run_all()` included).\n- Interaction with `.until(deadline)`: whichever limit is reached first\n cancels the job (first-limit-wins). The existing `.until()` semantics\n must not regress.\n- After a job exhausts its budget, `Scheduler.next_run` / `idle_seconds`\n must reflect its removal.\n- Validation: n must be an integer >= 1; any other value raises\n ValueError at `.max_runs(...)` call time. Calling `.max_runs()` more\n than once on the same job: the last call wins.\n- Budgets are per-job: multiple jobs with different budgets must not\n interfere with each other.\n- Document the new API wherever this project documents comparable Job\n methods, and keep the implementation idiomatic for this codebase.\n\nDeliver production-quality code: the full existing test suite must keep\npassing, and the new behavior must be covered by tests you add." --pair-verifywhen to use it
Community prompt sourced from the open-source GitHub repo fysoul17/devlyn-cli (no explicit license). A "Claude Prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
careercommunitygeneral
source
fysoul17/devlyn-cli · no explicit license