Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
push:
branches: [main, dev, release/*, feature/*, codex/*]
pull_request:
branches: [main, dev, release/*]

env:
CARGO_TERM_COLOR: always

jobs:
rust:
name: Rust checks
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libdbus-1-dev libssl-dev

- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Check formatting
run: cargo fmt --all --check

- name: Run release bar
run: make pre-release

- name: Smoke test CLI entrypoint
run: cargo run --bin solverforge-calendar-cli -- calendars list
58 changes: 58 additions & 0 deletions AGENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# AGENT.md

## Purpose

This repository contains a Linux-first Rust desktop calendar with two supported entrypoints:

- `solverforge-calendar`: ratatui TUI application
- `solverforge-calendar-cli`: non-interactive JSON CLI for agents and automation

## Commands

- `make build`: build both binaries
- `make run`: launch the TUI
- `make run-cli ARGS="calendars list"`: run the automation CLI
- `make test`: run all tests
- `make lint`: run formatting and clippy checks
- `make ci-local`: match the GitHub Actions CI workflow locally
- `make pre-release`: run release-oriented validation before cutting or tagging a version

Direct cargo commands used in CI:

- `cargo fmt --all -- --check`
- `cargo clippy --bins --tests -- -D warnings`
- `cargo build --bins`
- `cargo test`

## Repo map

- `src/main.rs`: TUI entrypoint
- `src/bin/solverforge-calendar-cli.rs`: CLI entrypoint
- `src/cli.rs`: typed CLI parsing, JSON responses, command dispatch, CLI tests
- `src/db.rs`: SQLite schema, migrations, CRUD helpers, default-calendar recovery
- `src/google/`: OAuth, sync fetch/apply logic, Google event translation
- `tests/cli.rs`: binary-level CLI integration tests
- `docs/wireframes/`: ASCII wireframes for the TUI and CLI surfaces

## Constraints

- Keep the CLI fully non-interactive. No prompts, no confirmation flows, no “choices”.
- Preserve `cargo run` as the TUI default path.
- Keep agent automation explicit through `solverforge-calendar-cli` and `scripts/solverforge-calendar-cli`.
- Prefer shared DB/business-rule fixes over CLI-only patches when behavior affects both the TUI and CLI.
- Tests must stay deterministic. Do not add live Google API or real keyring dependencies to automated tests.

## Change checklist

Before pushing changes:

1. Run `make lint`
2. Run `make test`
3. If binaries changed materially, run `make build`
4. Before tagging or pushing a release version, run `make pre-release`

If you touch the CLI contract, update:

- `README.md`
- `tests/cli.rs`
- `docs/wireframes/cli.md` when the command surface or response model changes
193 changes: 192 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading