Build Tasknibbler: a one-card-at-a-time Todoist review app for Android
Copy everything below the line into Claude Code (or another coding assistant) in an empty folder.
You are building Tasknibbler, a native Android app that turns a person's Todoist "today" list into a stack of index cards shown one at a time. The user decides each card with a swipe and moves on. The whole point is speed and calm: one task on screen, one decision, next. Every design and engineering choice should protect the fast swipe-through feel.
Build it from scratch from this specification. There is no existing code or asset to copy. Ask me before departing from anything marked must; use your judgement elsewhere, and tell me what you chose.
1. Platform and architecture
- Must: native Kotlin with Jetpack Compose. Minimum Android 8.0 (API 26). Target the current Android API level.
- Must: the app talks directly to the Todoist API from the phone. No server of our own, no accounts of our own, no analytics.
- Gradle with a version catalog, split into three modules so the logic is testable without Android:
domain(plain Kotlin/JVM): task model, recurrence rules, the review session, and an "action planner" that turns each card action into the exact Todoist calls to send plus the calls that undo it.todoist(plain Kotlin/JVM): HTTP client for Todoist, a persisted action queue, and the "deck" that ties session, planner and queue together.app(Android): storage, screens, gestures, reminders.
- Pin every dependency to an exact, stable version that is at least a few weeks old. Prefer few dependencies: OkHttp, kotlinx.serialization, kotlinx.coroutines, Compose foundation. Material components are not needed; the look is custom.
- Single activity, one process-wide model object (held by the
Application) that owns the deck, the queue and which screen is showing. No navigation library; screens are an enum.
2. Todoist integration
Use Todoist's unified API v1 at https://api.todoist.com/api/v1/ with Authorization: Bearer <token>. Verify endpoint details against Todoist's current documentation before relying on them.
- Fetch:
GET tasks/filter?query=<filter>&limit=200, followingnext_cursoruntil it is null. Readid,content,description,labels, anddue(date,string,is_recurring). - Complete / reopen:
POST tasks/{id}/close,POST tasks/{id}/reopen. - Update:
POST tasks/{id}with JSON containing only the fields being changed:due_date,due_string,labels. - Add:
POST taskswithcontentanddue_date; the response gives the new id. - Delete:
DELETE tasks/{id}(used only to undo an add). - Postpone a recurring task (critical): setting only
due_dateon a recurring task destroys its recurrence. To move a recurring task's next occurrence while keeping its repeat rule, use the sync endpoint:POST syncwith form fieldcommandsset to a JSON array containing oneitem_updatecommand whoseargsare{"id": <task id>, "due": {"date": "<YYYY-MM-DD>", "string": "<the task's existing due string>", "is_recurring": true}}, with a fresh UUID as the command'suuid. Treat it as failed unlesssync_status[<uuid>]is"ok". - Errors: sort every failure into one of three kinds: offline (network unreachable; retry later unchanged), unauthorized (401/403 or no token; ask for a new token), or failed (Todoist answered but refused).
3. Task rules
All of these live in domain with unit tests.
Labels
Recurring tasks carry labels that record how they behave. The app creates and maintains them; Todoist creates a label automatically the first time it is used.
- Mode:
randrecur(comes back after a random interval) orconsistrecur(fixed interval). If both are present,randrecurwins. - Type:
memory(something to keep in mind) ortask(something to get done). If both are present,memorywins. - When setting one label of a pair, remove the other and keep all unrelated labels in their original order.
Recurrence interval parsing
Parse the interval in days from a task's due string, case-insensitively; an optional ! after "every" is allowed (Todoist's "every!" means "from completion"):
| Due string | Days |
|---|---|
| every day | 1 |
| every other day | 2 |
| every N days | N |
| every week, every monday … sunday (and mon … sun) | 7 |
| every other week | 14 |
| every N weeks | 7N |
| every month | 30 |
| every other month | 60 |
| every N months | 30N |
| anything else, empty, or no due | unknown |
Writing a recurrence
- Random interval: pick 30–50 days.
- The due string written is exactly
every! N days starting <Mon DD YYYY>, where the start date is today plus N days, formatted in English with a zero-padded day (for exampleevery! 14 days starting Oct 08 2026).
Resolving a recurring task ("done" on a recurring card)
- Mode
consistrecur: complete it (Todoist schedules the next occurrence). - Mode
randrecur: do not complete; re-roll a new random interval with the due string above. - No mode label: treat it as
consistrecurif its interval is 7 days or less, otherwiserandrecur, and add that label.
The review session
Immutable value type holding the tasks of the current pass, an index, a "set aside" list, and a looped flag.
- Skip puts the current task on the set-aside list and moves on.
- Advance moves past a handled task.
- When the pass runs out and set-aside tasks exist, they become the next pass and
loopedis set, so the UI can say "circling back to N set-aside tasks". remainingis tasks left in the current pass, not counting set-aside ones.- Support replacing the current task in place (edits that keep the card) and appending a task to the end of the pass (add).
The action planner
A pure function: given a task, an action and today's date, return the Todoist calls to send, the calls that undo them, the task as it stands afterwards, whether the deck moves on, and the day count involved (for messages).
| Action | Allowed on | Calls | Undo | Moves on |
|---|---|---|---|---|
| Done | one-time | complete | reopen | yes |
| Done | recurring | resolve as above (auto-tag first if needed) | reopen and restore labels, or restore due string and labels | yes |
| Tomorrow / N days | any | one-time: set due date; recurring: postpone | restore the old date the same way, if it was a plain date | yes |
| Bump (5–14), Big bump (15–30), Bigger bump (31–60) | one-time only | set due date to a random day in range | restore old date | yes |
| Make recurring as memory or task, random or every N | one-time only | set the due string and the mode and type labels in one update | restore due date and labels | yes |
| Change interval, random or every N | recurring only | set due string and mode label | restore due string and labels | yes |
| Switch memory ↔ task | recurring only | set labels | restore labels | no |
| Remove recurrence | recurring only | set due date to today | restore the due string | no |
Reject actions that don't apply (and zero or negative day counts) with an error.
4. Loading, saving and undo
- Dealing a plate (on first launch, cold start, a new day, or the user asking for a fresh one):
- Send everything waiting in the queue first, so handled tasks can't reappear. If that is blocked by being offline or by a refused token, show the matching screen instead of a plate.
- Fetch tasks with no date and set each one due today.
- Fetch
today | overdue, shuffle, and start a session.
- Optimistic actions: a swipe updates the screen immediately. The Todoist calls go into a persisted, ordered queue (a JSON file written atomically) and are sent in the background in the order they were made.
- Queue behaviour:
- Offline: stop and keep everything; send again when the network returns (register a network callback) or the app comes to the front.
- Refused token: stop and show a "replace token" path.
- Other failures: retry quietly up to three times, then move the action to a "didn't save" list shown when the plate is cleared, with retry and dismiss for each.
- A multi-call action that was partly sent resumes from the call that failed, without repeating earlier ones.
- A task added offline gets a local id; once Todoist returns the real id, later queued calls are rewritten to use it.
- Undo: single step, for the last action only. If its calls haven't been sent yet, drop them from the queue; otherwise queue the reverse calls. Undoing an add that already reached Todoist deletes the task.
- Never block a swipe on the network. Only dealing a plate waits.
5. Screens and interaction
The card screen
- Header: "Today's Nibbles" in bold serif, with a small italic subtitle: "the daily review", or "N waiting to sync", "offline", or "token refused" in amber when relevant. On the right, three outline icons drawn in code: add (+), today's list (three lines, the last shorter), settings (two sliders).
- Status line under the header: shows the confirmation of the last action for about 1.6 seconds (for example "crossed off", "back in 41 days", "set aside for 9 days"), then settles to a label of what undo would reverse (for example "done: Buy milk"), with an underlined "↺ undo" link at the right.
- The card: an off-white index card, slightly rotated (about −0.6°), thin border and a soft offset shadow. Contents:
- a red handwritten "due today" tag in a thin tilted box;
- for recurring tasks, a plum tag with the type ("memory" or "task") and a small italic "↻ every 3 days" or "↻ random";
- the task title, large and bold;
- the description in italics, prefixed "— ", if there is one;
- a thin rule, then "N left on the list · M set aside".
- Edge hints: "↑ delay" at the top, "↓ edit" at the bottom, "skip ←" on the left and "→ done" on the right, both turned to read top to bottom. Hints are dim and italic at rest; the one in the drag direction becomes bold and coloured while dragging. On random-recurrence cards the right hint reads "→ again".
The gesture (the heart of the app)
- One drag gesture on the card. Ignore movement under about 14 dp; after that, lock to an axis once one direction clearly dominates (more than 1.25× the other).
- Horizontal: the card follows the finger and rotates slightly. Past about 110 dp to the right, releasing marks it done; past 110 dp to the left, releasing skips it. A rubber stamp fades in as you drag: green DONE (or AGAIN for random-recurrence cards) tilted −13°, navy NEXT tilted 11°. Stamps have a double border, as if inked.
- Vertical: the card lifts or drops (capped at about 110 dp, shrinking very slightly). Past about 70 dp up opens the delay panel; past 70 dp down opens the edit panel. A soft coloured wash appears on that side (amber up, plum down).
- Releasing short of a threshold springs the card back.
- Swiping must feel instant. Never wait on the network before moving to the next card.
Panels (opened by swiping up or down)
All panels share a layout: the header (with a coloured subtitle), a "slip" showing the current task's title with a "back to review" link, the panel itself as a tilted card with a coloured handwritten tag and tappable rows (bold label, italic hint, "›" chevron, dotted dividers), and a "nevermind" link. Panels sit at the bottom of the screen, where a thumb reaches.
- Delay (amber), rows in this order, most-used last: Custom days, Bigger Bump (31–60 days), Big Bump (15–30 days), Bump (5–14 days), Tomorrow. On recurring cards only Custom days and Tomorrow appear, with a note "bumps are for one-time tasks".
- Edit, one-time task (plum), two steps: "what kind?" with Memory (something to keep in mind) and Task (something to get done), then "how often?" with Random recurrence (comes back every 30–50 days) and Set cadence (repeats every N days), plus a "← memory or task?" link back.
- Edit, recurring task: Change interval (now every N days / random), Make it a memory/task (switches type), Remove recurrence (one-time task, due today).
- Steppers (Custom days, Set cadence): a sentence like "Repeat every [14] days." where the number is an editable underlined field (number keyboard), − and + round buttons, and a "set it" outline button. Range 1–365.
Other screens
- Add task: "What needs doing today?" with an underlined text field and "add it". The task goes to the end of the current pass, due today, and is undoable.
- Today's list: slides up over the card screen. Shows counts, a "reshuffle" link and a close button; lists the remaining tasks (the current one marked "up now") and then set-aside ones (marked "set aside"), with "↻" rhythm notes under recurring ones.
- Plate cleared: "nothing left to nibble", the "didn't save" list if any, and a "serve a fresh plate" link.
- Loading / offline / refused token / error: "dealing with today's plate…"; offline says "can't load today's tasks" and explains that the plate is served fresh each time so there's no saved copy, shows any "N actions waiting to sync", and offers "try again"; refused token offers "replace token".
- Settings: Daily reminder (time picker), Turn the reminder off, Nudge when I've been away, Rotate with the phone, Todoist token (replace), Serve a fresh plate.
First launch: the token
Make getting the token painless. Two numbered steps on one card:
- "Copy your API token", with a button that opens
https://app.todoist.com/app/settings/integrations/developerin the browser. - "Come back and paste it", with a paste button that fills the field from the clipboard (show "Nothing to paste yet — copy the token first" if empty), a masked field for typing it instead, and "save it".
Store the token encrypted with an AES-GCM key held in the Android Keystore; only ciphertext is written to app storage. Explain on screen that it stays on the phone and is sent only to Todoist. Don't auto-focus the field.
6. Reminders
Neither reminder makes a network call.
- Daily reminder: on by default at 5:00 AM phone time, adjustable or switchable off in settings.
- Away nudge: off by default. When on, record when the app goes to the background and set a reminder for 3 hours later; coming back to the app cancels it. One nudge per absence. Drop it if it would land between 10 PM and 7 AM, or if today's plate has already been cleared (check again at firing time).
- Alarms: use an ordinary, inexact, allow-while-idle alarm. Do not request exact-alarm permissions; Google Play restricts them to clock and calendar apps. Re-schedule after reboot, app update, and time or timezone changes.
- Notifications: ask for notification permission once (Android 13+). Title "Today's Nibbles"; tapping opens the app. The text is chosen at random from a list, never repeating the previous one:
- Your plate's still got a few bites on it.
- A task or two is waiting to be nibbled.
- Got a minute? Take a nibble.
- Your cards are shuffled and ready.
- One small bite is still progress.
- Something on today's list would like your attention.
- Time for a quick snack of tasks.
- The next card is waiting face up.
- Nibble, nibble. What's next?
- A couple of swipes could clear a little room.
- Your list is right where you left it.
- Bite-sized progress beats none at all.
- Today's plate is waiting for you.
- Pick a card, any card.
7. Visual design: "warm analog"
Cream paper, index cards, ink, rubber stamps and handwriting. Calm, tactile, a little playful. Not a generic Material app.
| Token | Hex | Use |
|---|---|---|
| Paper | #F0E6D2 | background |
| Paper dark / line | #D8CDB3 | header rule, card borders |
| Line dim | #E3D9BD | dividers inside cards |
| Stub | #EFE6D3 | task slips, list rows |
| Card | #FFFDF7 | cards and panels |
| Ink | #2B2620 | main text |
| Ink dim | #6F6552 | secondary text, hints |
| Ink soft | #594F3F | descriptions, fresh status text |
| Chevron | #A89A72 | "›", placeholders |
| Red | #A13A2F | "due today" tag |
| Green | #3D6B3F | DONE stamp, done hint, add screen |
| Navy | #3A4658 | NEXT stamp, skip hint, token and settings |
| Amber | #A37B1E | delay, sync warnings |
| Plum | #6B5B7A | edit, recurring type tag |
- Type: a serif for everything (the platform serif is fine, or bundle one similar to Georgia) and a handwritten face only for the small tilted tags. Body text 15–17 sp, titles 22 sp.
- Legibility (must): nothing meant to be read is smaller than 15 sp; enforce it in the single text helper every screen uses.
- Small rotations on cards and tags (−0.4° to −2°) give the paper feel; keep corners nearly square (2–3 dp radius).
- Status and navigation bars are transparent with dark icons on the cream background. Draw edge to edge and pad content by the system insets.
- Write all copy in lowercase-friendly, plain, warm language; keep it short. Use the wording given in this spec.
Landscape
Support rotation, with a settings toggle "Rotate with the phone" (on by default; off locks to portrait). Handle rotation without recreating the activity so half-typed text survives.
- Sideways layout: move the header into a left rail about 214 dp wide. The rail holds the title and subtitle, the status text and undo, the task slip on panels, "nevermind" at its foot, and the three icons at the bottom. The card or panel gets the full height beside it.
- Panel rows become single-line (label and hint side by side) so a five-row panel fits.
- Steppers put the sentence, −/+ and "set it" on one row above the keyboard.
- Today's list uses two columns.
- Cap the card's width (about 460 dp) so it doesn't stretch.
8. Demo mode
Debug builds only, opened by launching the main activity with a boolean extra demo. It uses about nine built-in sample tasks (a few recurring, some with descriptions), keeps its queue in memory, never contacts Todoist, and shows "demo · sample tasks" under the title so it can never be mistaken for real data. Use it for screenshots and for driving the app in tests.
9. Builds and distribution
- Debug builds: application ID suffix
.debug, version suffix-debug, app name "Tasknibbler (debug)", so a debug copy installs beside the store copy. - Release builds: sign with an upload key described in a git-ignored
keystore.propertiesfile (store file, passwords, alias); without that file the release build still runs unsigned. Never commit keys or passwords. Give me thekeytoolcommand to create the key myself rather than creating it for me. - Build an
.aabfor Google Play's internal testing track. BumpversionCodefor every upload. - The app's data is excluded from device backup.
10. Testing
- Unit-test the
domainmodule thoroughly: interval parsing (every row of the table), label precedence and replacement, the due-string format, the resolve rule, every row of the action planner including its undo calls and refusals, the session's skip/advance/loop behaviour, and reminder timing and message rotation. - Test the Todoist client against a local mock HTTP server, including paging, the postpone sync command, request bodies containing only changed fields, and error sorting.
- Test the queue with a fake API: ordering, offline stop and resume, retry then give up, retry and dismiss of failed actions, resuming a half-sent action, cancelling unsent actions, local-to-real id rewriting, and surviving a restart.
- Test the deck: undated tasks dated today, shuffle, swipe-then-send in the background, undo before and after sending, circling back, add then complete before it's saved.
- When testing against a real Todoist account: create your own test tasks with an obvious prefix (for example
TESTTASK), act only on those, and complete them afterwards. Never change the user's own tasks.
11. Privacy
Write a short privacy policy stating the facts:
- The app talks only to Todoist; there are no servers of ours and no data sent to the developer.
- The token is stored encrypted on the device.
- Offline changes sit in a file on the device until sent.
- No ads, analytics or tracking.
- The clipboard is read only when "paste" is tapped.
- Uninstalling removes everything, and issuing a new Todoist token cuts off access.
Include a statement that the app is independent and not affiliated with Doist.
12. How to work
- Before any Android code, build a single-file HTML/JS prototype of the card screen, the gesture and the panels with sample data, so I can try the feel in a browser and give feedback. Keep it as the UX reference.
- Then build in this order:
domainwith tests,todoistwith tests, the Compose UI, reminders, landscape, release setup. - After each stage, run the tests and tell me plainly what passed, what you didn't verify, and what needs me (installing on my phone, pasting my token, creating the signing key).