# kcode-task-board 0.1.2
`kcode-task-board` owns Kennedy's SQLite task graph. `TaskBoard::open(path,
credits)` opens or creates it, enables WAL/foreign keys/a 37.5-second busy
timeout, and returns a cloneable handle with one short writer lane. The credit
database is a separate `kcode-credits::Credits` handle.
## Read API
- `revision()` returns the board-wide monotonic mutation revision.
- `categories(page)` pages categories containing visible tasks assigned to
`page.user_id`; `tasks(page)` pages that user's visible tasks.
- `category(category_id, page)` gets one category and its assigned visible
task page. `task(task_id)` gets a known active task and its categories,
parents, children, and symmetric related neighbors. Direct task lookup also
reports whether the task is currently on the orphan stack.
- `top_orphan()` peeks at the durable LIFO orphan stack without changing it.
`BrowsePage` requires a nonempty user ID, a limit from 1 through 200, and an
offset representable by SQLite. Pages include the revision observed by their
short read connection and an optional next offset. Ordinary lists exclude
queued orphans; callers enforce which direct task lookups a user may see.
## Mutation API
- `create_category(input)` and `remove_category(category_id)` create or remove
a known category. Removing it only detaches its task memberships.
- `create_task(input)` creates a task, its category memberships, and initial
parent, child, and related edges. Generated task IDs exactly match
`task-id-[0-9a-f]{12}`.
- `update_task(input)` updates supplied scalar fields and replaces only the
supplied relationship sets. Child edges may contain cycles. Related edges
are stored symmetrically. A nonterminal update of the top orphan removes it
from the stack; an attempted update of a lower orphan fails. With
`complete=true`, every supplied field is applied in that same transaction
before the resulting task is archived and detached. Its resulting credits are
awarded after the task writer lane is released. Award failure is returned as
`credit_warning` and does not undo completion.
- `remove_task(task_id)` permanently deletes a task. Removing or completing a
task pushes each child that thereby loses its final parent onto the orphan
stack using one set-based statement. Lower queued orphans cannot be removed.
Every mutating method is one short immediate SQLite transaction. Reads use
separate query-only connections. The schema indexes user, category, incoming
edge, related-edge, and orphan lookups. The library intentionally performs no
cycle or graph-degree checks and exposes no global Kennedy list/search API.