Update AGENTS.md to reflect Loro storage and current module layout

Amolith created

Change summary

AGENTS.md | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

Detailed changes

AGENTS.md 🔗

@@ -15,17 +15,18 @@
 
 ## Implementation details
 - Project resolution: most commands resolve the project via `db::resolve_project_name()` which checks `--project` flag, `TD_PROJECT` env var, or the directory binding in `~/.local/share/td/bindings.json`. Without a resolved project, commands fail with "no project selected". Only `project` and `skill` subcommands avoid this check.
-- DB schema is created in `src/db.rs` (`SCHEMA`):
-- Foreign keys are explicitly enabled on each connection (`PRAGMA foreign_keys = ON`).
-- Task IDs:
-  - top-level: generated short IDs (`td-xxxxxx`) via `db::gen_id()`
-  - subtasks: `<parent>.<n>` generated by counting existing children in `create`.
+- Storage is Loro CRDT documents (`base.loro` + incremental changes in `changes/`). There is no SQL database; `src/db.rs` is the Loro document store and task model, not a database layer.
+- Schema versioning lives in `src/migrate.rs` (`CURRENT_SCHEMA_VERSION`); migrations operate on the Loro document structure.
+- Task IDs: all tasks (top-level and subtasks) get ULIDs via `db::gen_id()`, displayed to the user as short `td-XXXXXXX` forms. Subtasks link to their parent via a `parent` field.
 
 ## Command/module map
 - CLI definition and argument shapes: `src/cli.rs`
 - Dispatch wiring: `src/cmd/mod.rs`
-- Command implementations live in `src/cmd/*.rs` (one module per subcommand, including `skill`).
-- Shared DB/domain helpers and structs (`Task`, `TaskDetail`, loaders): `src/db.rs`
+- Command implementations live in `src/cmd/*.rs` (one module per subcommand: `create`, `dep`, `doctor`, `done`, `export`, `import`, `label`, `list`, `log`, `next`, `project`, `ready`, `reopen`, `rm`, `search`, `show`, `skill`, `stats`, `sync`, `tidy`, `update`).
+- Loro document store, task model, and domain helpers (`Task`, `TaskId`, `Status`, etc.): `src/db.rs`
+- Schema migrations for the Loro document structure: `src/migrate.rs`
+- Priority/readiness scoring logic: `src/score.rs`
+- Terminal colour helpers: `src/color.rs`
 
 ## Testing approach
 - Integration-style CLI tests in `tests/cli_*.rs` using:
@@ -46,7 +47,6 @@
 
 ## Gotchas
 - Running commands without a project binding (and without `--project` or `TD_PROJECT`) yields `no project selected`. Tests should set `current_dir` to directories with initialized bindings.
-- `Cargo.toml` uses `rusqlite` with `bundled` feature, so SQLite is vendored; build behavior differs from system-SQLite setups.
 
 ## Contributions