This repository contains a Linux-first Rust calendar with two supported entrypoints:
planner123: ratatui TUI applicationplanner123-cli: non-interactive JSON CLI for agents and automation
make build: build both binariesmake run: launch the TUImake run-cli ARGS="calendars list": run the automation CLImake test: run all testsmake lint: run formatting and clippy checksmake ci-local: match the GitHub Actions CI workflow locallymake pre-release: run release-oriented validation before tagging
Direct cargo commands used in CI:
cargo fmt --all --checkcargo clippy --bins --tests -- -D warningscargo build --release --binscargo test
PRD.md: current product requirements for the v0.4.x milestonesrc/main.rs: TUI entrypointsrc/bin/planner123-cli.rs: CLI entrypointsrc/app.rsandsrc/app/: stable TUI facade plus state, dispatch, navigation, forms, planner, integrations, and worker-result modulessrc/cli.rsandsrc/cli/: stable typed CLI facade plus arguments, handlers, runtime, validation, and backend modulessrc/calendar_service.rsandsrc/calendar_service/: shared calendar facade plus validation, mutation, and test modulessrc/event_service.rsandsrc/event_service/: shared event facade plus validation, mutation, and test modulessrc/ical.rsandsrc/ical/:.icsfacade plus parsing, candidate, time, import/export, and test modulessrc/google/: OAuth, calendar discovery, typed event API, and Google payload mapping; its larger concerns use the same facade-plus-fragments patternsrc/sync/: sync engine, pull, push, conflicts, and persisted sync-state helpers, each split by responsibilitysrc/db.rsandsrc/db/: SQLite facade plus schema migrations, CRUD families, sync metadata, planner evidence, and testssrc/planner.rsandsrc/planner/: planner facade plus settings, tasks, availability, optimization, proposal lifecycle, evidence, and testssrc/models.rsandsrc/models/: stable data-model facade plus calendar, event, dependency, planning, and proposal typestests/cli.rsandtests/cli/: binary-level CLI integration facade plus command-family test modulesdocs/wireframes/: ASCII references for the CLI and TUI surfaces
- Keep the CLI fully non-interactive. No prompts, no confirmation flows, no choices.
- Preserve
cargo runas the TUI default path. - Keep agent automation explicit through
planner123-cliandscripts/planner123-cli. - Route event mutation behavior through shared services, not UI-local rules.
- Treat Google sync as explicit and deterministic. No hidden auto-sync startup behavior.
- Tests must stay deterministic. Do not add live Google API or real keyring dependencies to automated tests.
Before pushing changes:
- Run
make lint - Run
make test - If binaries changed materially, run
make build - Before tagging or pushing a release version, run
make pre-release
If you touch the CLI contract, update:
README.mdtests/cli.rsdocs/wireframes/cli.md
Keep every tracked Rust source and test file below 300 lines. Large public subsystems retain their existing root module as a stable facade and place cohesive implementation fragments in the matching directory. Move comments with the code they explain; do not delete them while restructuring.
If you touch Google sync or .ics behavior, update:
README.mdPRD.mdif the planned scope changesdocs/wireframes/tui.mdanddocs/wireframes/cli.mdwhen user-facing flows change