todoapp
CLAUDE.md2 starsChanged 5 months agoApache-2.0View on GitHub
tda — a keyboard-first tool to capture, organize, and refine tasks linearly and as graphs/trees, for humans and AI agents. tda-spec.md is the source of truth (decisions are marked [DECISION], open ones in §13); cite its sections when explaining choices. Status: M0–M2 done and green. M4 (TUI) delivered next (before M3 CLI, per user decision). M3/M5/M6 follow §10. Later adapters (per §5): todoapp-api, todoapp-mcp, todoapp-ui-core. adapters → app → core. Nothing in todoapp-core may import an adapter, a runtime, or…
In this repositoryOne other file it gives its agents.
- tdaSkill
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 67
Decider pattern (§5a): all task-local mutations go through decide<St: ComponentStore>(&St, &Id, &Command, &DecideCtx) -> Result<Vec<Event>, …
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
tda — a keyboard-first tool to capture, organize, and refine tasks linearly
and as graphs/trees, for humans and AI agents. tda-spec.md is the source
of truth (decisions are marked [DECISION], open ones in §13); cite its
sections when explaining choices.
Status: M0–M2 done and green. M4 (TUI) delivered next (before M3 CLI, per user decision). M3/M5/M6 follow §10.
Workspace
crates/
todoapp-core/ # domain: model, capabilities, the decider, PORTS (traits). No I/O deps.
todoapp-app/ # use cases: async orchestration of core + ports
todoapp-store-mem/ # adapter: in-memory store (per-capability component maps), tests + dev
todoapp-store-turso/ # adapter: Turso/SQLite persistence (M2)
todoapp-conformance/ # shared conformance test suite (macro runs against both stores)
todoapp-cli/ # adapter: the `tda` binary — CLI, plus the ratatui TUI
# behind a default-on `tui` feature (its own `tui`
# module). DB via resolve_db_path (see below).Later adapters (per §5): todoapp-api, todoapp-mcp, todoapp-ui-core.
todoapp-cli / TUI conventions (M4)
- The TUI lives in
todoapp-cli/src/tui/behind thetuicargo feature (ratatui/crossterm/etc. are optional);--no-default-featuresbuilds a headless CLI. Command dispatch iscommand::run_command(&svc, &req) -> Reply(writes output to a buffer), shared by the direct CLI path and the TUI server. - Concurrent access (single-writer socket). turso takes an exclusive
cross-process db lock, so while
tda tuiruns it is the only process that can open the db. It binds a Unix socket next to the db file (tda.sock) and, once per terminal-poll cycle, drains pending connections: runs the sent command in-process andrebuild()s so external changes show live. Othertdainvocations send their command to that socket (ipc::send); with no server (or connection refused) they open the db directly. Transport is intodoapp-cli/src/ipc.rs(unix; server bits gated ontui). AppStateownsTursoStore;make_svc(store, clock, ids)buildsServicesfrom individual field references (field-level borrows, noBox::leak).build_visible_items(store, clock, ids, expanded)is a free async fn for tree rebuild; the caller assigns the result toself.itemsafter borrows are released.SystemClock(SystemTime+ jiff) +UlidGen(ulid crate) are the real impls, intodoapp-cli/src/svc.rs(always compiled — the headless CLI needs them without ratatui), alongsidemake_svc.- DB path (
resolve_db_path, shared by CLI + TUI):--dbflag > nearest ancestor.tda/tda.db(created bytda db init, git-style walk from cwd)OS-standard data dir, e.g.
~/.local/share/tda/tda.dbon Linux. Config is split by scope, both in the OS-standard config dir, with path resolution + generic TOML parsing colocated intodoapp-config(config_path/tui_config_path/read_toml, returningtoml::Value) so typed schemas stay with their owning crate:config.tomlfor cross-app settings shared with the CLI (currently just[workspaces]),tui.tomlfor TUI-only settings (columns/schedule/status/styles/keybindings/behavior, parsed into thetuimodule'sConfig/Keymapviaserde::Deserializeover the sharedtoml::Value). No env var overrides (dropped as YAGNI). - Actor for claim: fixed
Id("me")— single-user, no auth (spec §2/§13 Q5).
Inviolable: the dependency rule (§5)
adapters → app → core. Nothing in todoapp-core may import an adapter, a runtime,
or a framework. Enforced by mise run lint (→ lint:core-no-io, a denylist
grep over cargo tree). serde, derive_more, and async-trait are allowed in core
(serialization / error / async-glue, not I/O).
Conventions
- Decider pattern (§5a): all task-local mutations go through
decide<St: ComponentStore>(&St, &Id, &Command, &DecideCtx) -> Result<Vec<Event>, Denied>thenapply<St: ComponentStore>(&St, &Id, &Event)— capability-keyed and async: a guardgets only the components it inspects,applysets only what changed. Gated by an ordered list of guards (first denial wins). Graph-aware ops (move/link, cycle checks) live intodoapp-app. Extending = add aComponenttype + itsCommand/Eventvariant + a guard + anapplyarm. - Async boundary (§5): repository ports are
asynctraits (async-trait,?Send), and use cases areasync.decide/applyare async over theComponentStoreport (defined in core, so the dependency rule holds); query evaluation hoists its async component loads before the sync sort. Recursive walks are iterative (no boxed async recursion). - Storage (§7): capability-keyed components, one per capability, keyed by
task id; presence is the capability.
ComponentStore::{get,set,remove}::<C>touch one capability at a time (no whole-task aggregate);TaskEntityStoreholds the minimal id+timestamps entity.Services::snapshotassembles a read-onlyTaskSnapshotfor query results / export only — never fed back todecide/apply. - Errors:
derive_more(Display/Error/From) in libs,anyhowin bins. IDs: ULID (opaqueIdstring; tests use a sequence). Time/ids are injected (Clock/IdGenerator) for deterministic tests.
Commands (mise)
mise run build·mise run test·mise run lint·mise run formatmise run ci— the full gate (lint + test +fmt --check); run before commit.- Snapshot tests use
insta(cargo insta reviewto accept changes). - Per global config: use
rg/fd, not grep/find.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

