|
4 | 4 | Deliver an ergonomic CLI that surfaces Plausible Analytics capabilities to humans and LLMs, while respecting rate limits, juggling multiple accounts, and enabling queued API execution. |
5 | 5 |
|
6 | 6 | ## Current Status — 2025-10-29 |
7 | | -- ✅ Foundations in place: repo scaffolding, account store (file-backed), Plausible client (sites + stats aggregate), rate limiter scaffold, queue/worker, baseline CLI commands (`status`, `sites list`, `stats aggregate`, `events template`, `accounts` CRUD), docs/LLM artefacts, CI wiring (latest on `main` @ a38358b). |
8 | | -- ⏳ Features to extend: events `send/import`, stats `timeseries` & `breakdown`, queue `inspect/drain`, additional Plausible endpoint coverage (sites CRUD, events POST), daily budget configurability, secure keyring fallback. |
9 | | -- 🔬 Test gaps: integration coverage via `assert_cmd`, expanded HTTP mocks (sites CRUD, events POST), JSON snapshot assertions, rate-limit exhaustion/backpressure scenarios. |
| 7 | +- ✅ Foundations in place: repo scaffolding, account store (file-backed), Plausible client (sites + stats aggregate/timeseries/breakdown + events send), rate limiter scaffold, queue/worker with inspect/drain, CLI surface (`status`, `sites list`, `stats aggregate/timeseries/breakdown`, `events template/send/import`, `accounts` CRUD), docs/LLM artefacts, CI wiring (latest on `main` @ 3a2b77c). |
| 8 | +- ⏳ Features to extend: stats `realtime`, sites CRUD/reset/delete, queue retry/backoff controls, daily budget configurability, secure keyring fallback, telemetry export. |
| 9 | +- 🔬 Test gaps: full CLI integration coverage via `assert_cmd` + JSON snapshots, expanded HTTP mocks (sites CRUD, realtime), backpressure + large import cases, keyring mock coverage. |
10 | 10 | - 🚀 Distribution polish pending: GitHub release workflow, `cargo install` docs, Homebrew tap automation, tagged release + changelog. |
11 | | -- 🧭 Next sprint focus: close remaining CLI surface + persistence polish, then broaden tests before first public release. |
| 11 | +- 🧭 Next sprint focus: persistence polish (daily budget + keyring), extend site/event surface, then harden integration tests before release packaging. |
12 | 12 |
|
13 | 13 | ## Release Scope |
14 | 14 | - Sites, Stats, Events API coverage. |
|
83 | 83 |
|
84 | 84 | ### 6. CLI Commands & Output |
85 | 85 | - ✅ Sites `list`; ⏳ `create/update/reset/delete`. |
86 | | -- ✅ Stats `aggregate`; ⏳ `timeseries/breakdown/realtime` with shared flags. |
87 | | -- ✅ Events `template`; ⏳ `send/import`. |
88 | | -- ⏳ Queue `inspect/drain`. |
| 86 | +- ✅ Stats `aggregate/timeseries/breakdown`; ⏳ `realtime` with shared flags. |
| 87 | +- ✅ Events `template/send/import`. |
| 88 | +- ✅ Queue `inspect/drain`. |
89 | 89 | - ✅ Status (reports account, limits, queue stats, API health). |
90 | 90 | - ✅ Formatters: tables (human), JSON (machine). |
91 | 91 | - ⏳ Snapshot tests with `insta` or `similar`. |
@@ -147,19 +147,18 @@ gantt |
147 | 147 | - ⏳ Post-release checklist: publish crate or instructions, Homebrew tap update. |
148 | 148 |
|
149 | 149 | ## Next Implementation Priorities (TDD-First) |
150 | | -1. **Stats timeseries/breakdown** |
151 | | - - Red tests: extend `client` module mocks to capture new endpoints, add CLI integration snapshots (human + JSON). |
152 | | - - Green: implement API calls, queue intents, CLI wiring, output rendering, ensure rate-limit weights captured. |
153 | | -2. **Events send/import workflows** |
154 | | - - Red tests: event payload validation unit tests, CLI integration for `send` (stdin + flags) and `import` (NDJSON reader with `--dry-run`), worker interactions verifying queue submission. |
155 | | - - Green: implement request builders, streaming uploads, background processing, success/failure telemetry. |
156 | | - - Refactor: share schema templates between docs and runtime. |
157 | | -3. **Queue management commands** |
158 | | - - Red tests: queue inspection snapshots demonstrating ordering, drain command ensuring telemetry updates. |
159 | | - - Green: introspection APIs on queue, CLI commands, optional `--json`. |
160 | | -4. **Rate limit daily budget & keyring integration** |
| 150 | +1. **Sites CRUD & stats realtime** |
| 151 | + - Red tests: HTTP mocks for site create/update/reset/delete and realtime visitors; CLI integration snapshots (table + JSON). |
| 152 | + - Green: extend client endpoints, queue intents, confirmation prompts, output renderers. |
| 153 | +2. **Rate limit daily budget & keyring integration** |
161 | 154 | - Red tests: ledger persistence with configurable daily caps, platform keyring mock verifying fallback logic. |
162 | 155 | - Green: configuration plumbing, CLI flags/environment overrides, migration script for existing users. |
| 156 | +3. **CLI integration & snapshot test harness** |
| 157 | + - Red tests: `assert_cmd` coverage for happy-path commands, JSON/table snapshot assertions, rate-limit exhaustion scenarios. |
| 158 | + - Green: add fixture helpers, wire into CI, document how to refresh snapshots. |
| 159 | +4. **Queue resilience & telemetry** |
| 160 | + - Red tests: retry/backoff semantics, failure reporting, queue status metrics export. |
| 161 | + - Green: implement retry policy, expose metrics in `status` and `queue inspect` output. |
163 | 162 | 5. **Distribution pipeline** |
164 | 163 | - Red tests: check GitHub workflow via `cargo xtask` smoke (or script). |
165 | 164 | - Green: publish workflow, Homebrew tap formula generation, README install section refinements. |
0 commit comments