avelino / avelino/dotagent

Add `dotagent next` — chronological view of upcoming agent fires

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
area: cli area: scheduler type: feature
Dominant language
Rust
Stars
3
Forks
1
Avg merge
4h 50m
Merged PRs (30d)
1

Description

Today there is no way to ask dotagent "what is going to run in the next hour / day?" without inspecting each agent's manifest manually. The adaptive scheduler in `dotagent-scheduler` already computes the next fire time for every `(agent, schedule)` — that information just is not exposed at the CLI.

A `dotagent next` subcommand would show a chronological calendar view of upcoming executions across every discovered agent. Useful for: validating you didn't stack everything on the same minute, planning maintenance windows, debugging "why is this not running yet".

## Proposal

A new subcommand:

```
dotagent next # next 24h, all agents
dotagent next --window 7d # next 7 days
dotagent next --agent foo # only one agent
dotagent next --json # machine-readable
```

Output should be a chronologically sorted table:

```
2026-05-20 10:00 hello-fish/manual interval(10080m)
2026-05-20 10:15 databricks-cost-daily/morning cron(weekday=mon-fri 10:15)
2026-05-20 11:00 hello-go/hourly interval(60m)
```

## Acceptance criteria

- [ ] Default window is 24h. Configurable via `--window` (accepts `30m`, `4h`, `7d`).
- [ ] All schedule types render correctly: `interval`, `cron`, `expression` (depends on #5).
- [ ] `--json` emits a stable array of `{agent, schedule, fires_at, schedule_kind}` records.
- [ ] Agents with no firing in the window are listed at the bottom with reason ("next fire is in 14d").
- [ ] No new fields needed in `agent.toml`. Pure read from existing scheduler functions.

## Where to start

- `crates/dotagent-scheduler/src/lib.rs` — `next_after` is already there for `interval` and `cron`.
- `crates/dotagent/src/discovery.rs` — to walk every agent.
- `crates/dotagent/src/commands/output.rs` — the shared renderer convention.

## Non-goals

- Triggering anything. Read-only command.
- Showing past runs (that is `dotagent history`, sibling issue).

Contributor guide

Open the contributing guide

Research direction

Start with crates/dotagent-scheduler/src/lib.rs and its next_after function, then trace agent discovery in crates/dotagent/src/discovery.rs and rendering conventions in crates/dotagent/src/commands/output.rs. Define the command around existing scheduler data, including filters and window parsing; it is done when sorted text and stable JSON output cover all schedule kinds and explain agents with no fire in the window.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.