Core — Task Management¶
The core package contains the task management engine: TaskManager and its
mixins, IDManager, and shared constants.
TaskManager¶
- class jot.core.task_manager.TaskManager(storage_file='.jot.json', directory=None, id_manager=None, category=None, is_global=False, project_registry=None)[source]¶
Bases:
PersistenceMixin,IdMigrationMixin,CrudMixin,MetadataMixin,DeleteMixin,NavigationMixin,SubtaskMixin,AgeBacklogMixinHandles task storage and retrieval
- __init__(storage_file='.jot.json', directory=None, id_manager=None, category=None, is_global=False, project_registry=None)[source]¶
Initialize TaskManager.
- Parameters:
storage_file – Base filename (used only if category is None and not global)
directory – Project directory (ignored if is_global=True)
id_manager – Shared IDManager instance
category – Category name (validated for path traversal safety)
is_global – If True, use global category storage in ~/.jot-categories/
project_registry – Optional ProjectRegistry for keyword-based project routing
IDManager¶
- class jot.core.id_manager.IDManager(project_dir=None)[source]¶
Bases:
objectManages unique task IDs across all categories in a project
Constants¶
Core constants for jot application
Archive Manager¶
Archive management for jot tasks: compress, export, prune.
- class jot.core.archive_manager.ArchiveManager(project_dir=None)[source]¶
Bases:
ExportMixin,CompressMixinManages archived tasks: compress, export, prune
Mixins¶
CRUD Operations¶
CRUD mixin — add, get, edit tasks and schema migration.
- class jot.core._crud_mixin.CrudMixin[source]¶
Bases:
objectTask creation, retrieval, editing, and schema migration.
- add_task(task_text, priority='none', status='todo', labels=None, effort=None)[source]¶
Add a new task with guaranteed unique ID from IDManager.
Delete Operations¶
Delete mixin, archive, permanent delete, notes export.
Persistence¶
Persistence mixin — load, save, refresh.
Metadata¶
Metadata mixin — current, agent, day, priority, status, tally.
- class jot.core._metadata_mixin.MetadataMixin[source]¶
Bases:
objectSet task metadata: current flag, agent, day, priority, status, tally.
- set_current(task_id)[source]¶
Mark a task as current (only one can be current). If the task is archived, it will be automatically unarchived.
- set_agent_task(task_id=None)[source]¶
Mark a task as agent_task (Claude Code is working on it). Only one task can be agent_task at a time. Toggles if already set.
- set_highlight(task_id=None, color=None)[source]¶
Set highlight color on a task, or clear it.
- Parameters:
task_id – Task to highlight (defaults to current task).
color – Color name from HIGHLIGHT_COLORS, or None to clear.
- set_task_priority(task_id, priority)[source]¶
Set priority for a task (‘none’, ‘low’, ‘medium’, ‘high’).
Subtasks¶
Subtask sync mixin — parse checklist items from notes.
- class jot.core._subtask_mixin.SubtaskMixin[source]¶
Bases:
objectSync subtasks from task notes checklists.
- sync_subtasks_from_notes(task_id)[source]¶
Parse checklist items from task notes and sync as subtasks.
Parses ‘- [ ] text’ (todo) and ‘- [X] text’ (done) lines. Nested text below a checklist item becomes the subtask’s notes. Creates new tasks with ‘parent:{id}’ label, skips duplicates.
- Returns:
dict with ‘created’, ‘updated’, ‘total’ counts, or None if task not found
Compress¶
Compress mixin — compress archived tasks into tar.gz files.
Export¶
Export mixin — archive export to JSON, CSV, Markdown, text.
- class jot.core._export_mixin.ExportMixin[source]¶
Bases:
objectExport archived tasks in multiple formats.
- export_archives(format='json', output=None, include_compressed=True, category=None)[source]¶
Export archived tasks to various formats.
- Parameters:
format – ‘json’, ‘csv’, ‘markdown’, or ‘text’
output – Output file path (or None for auto-named file)
include_compressed – Include tasks from compressed archives
category – Export specific category only
- Returns:
dict with export results
Age Backlog¶
Age and backlog mixin — staleness detection and task transfer.
ID Migration¶
ID migration mixin — migrate and auto-fix task IDs.