diff options
Diffstat (limited to 'Omni/Task/README.md')
| -rw-r--r-- | Omni/Task/README.md | 61 |
1 files changed, 11 insertions, 50 deletions
diff --git a/Omni/Task/README.md b/Omni/Task/README.md index 21cf889..5113002 100644 --- a/Omni/Task/README.md +++ b/Omni/Task/README.md @@ -1,8 +1,7 @@ # Task Manager for AI Agents The task manager is a dependency-aware issue tracker inspired by beads. It uses: -- **Storage**: Local JSONL file (`.tasks/tasks.jsonl`) -- **Sync**: Git-tracked (automatically synced across machines) +- **Storage**: SQLite database (`~/.cache/omni/tasks/tasks.db`) - **Dependencies**: Tasks can block other tasks - **Ready work detection**: Automatically finds unblocked tasks @@ -96,7 +95,7 @@ task update t-20241108120000 in-progress task update t-20241108120000 done ``` -**Note**: Task updates modify `.tasks/tasks.jsonl` but don't auto-commit. The pre-commit hook will automatically export and stage task changes on your next `git commit`. +**Note**: Task updates are immediately saved to the SQLite database. ## View Dependencies ```bash @@ -123,10 +122,10 @@ task tree t-abc123 # Show specific epic/task with its children ## Export Tasks ```bash -task export [--flush] +task export [-o <file>] ``` -Consolidates and exports tasks to `.tasks/tasks.jsonl`, removing duplicates. The `--flush` flag forces immediate export (used by git hooks). +Exports tasks to JSONL format (stdout by default, or to a file with `-o`). ## Import Tasks ```bash @@ -137,20 +136,15 @@ Imports tasks from a JSONL file, merging with existing tasks. Newer tasks (based Examples: ```bash -task import -i .tasks/tasks.jsonl task import -i /path/to/backup.jsonl ``` ## Initialize (First Time) ```bash -task init --quiet # Non-interactive (recommended for agents) -# OR -task init # Interactive (for humans) +task init ``` -Creates `.tasks/` directory and `tasks.jsonl` file. - -**Agents MUST use `--quiet` flag** to avoid interactive prompts. +Creates the SQLite database at `~/.cache/omni/tasks/tasks.db`. ## Common Workflows @@ -325,32 +319,21 @@ AI assistants often create planning and design documents during development: - A task is **ready** if all its dependencies are `done` (or it has no dependencies) - `task ready` only shows tasks with status `open` or `in-progress` that are not blocked -## File Structure - -``` -.tasks/ -├── tasks.jsonl # Git-tracked, production database -├── tasks-test.jsonl # Test database (not tracked, auto-created) - -Omni/Ide/hooks/ -├── pre-commit # Exports tasks before commit (auto-stages tasks.jsonl) -├── post-checkout # Imports tasks after branch switch -└── ... # Other git hooks -``` +## Storage -Each line in `tasks.jsonl` is a JSON object representing a task. +Tasks are stored in a SQLite database at `~/.cache/omni/tasks/tasks.db`. This is a local database, not git-tracked. -**Git Hooks**: This repository uses hooks from `Omni/Ide/hooks/` (configured via `core.hooksPath`). Do NOT add hooks to `.git/hooks/` - they won't be version controlled and may cause confusion. +To back up or transfer tasks, use `task export` and `task import`. ## Testing and Development -**CRITICAL**: When manually testing task functionality (like tree visualization, flag ordering, etc.), you MUST use the test database: +**CRITICAL**: When manually testing task functionality, use the test database: ```bash # Set test mode to protect production database export TASK_TEST_MODE=1 -# Now all task operations use .tasks/tasks-test.jsonl +# Now all task operations use .tasks/tasks-test.db task create "Test task" --type=task task list task tree @@ -361,28 +344,6 @@ unset TASK_TEST_MODE **The test suite automatically uses test mode** - you don't need to set it manually when running `task test` or `bild --test Omni/Task.hs`. -**NEVER run manual tests against the production database** (`.tasks/tasks.jsonl`). This pollutes it with test data that must be manually cleaned up. Always use `TASK_TEST_MODE=1` for experimentation. - -## Integration with Git - -The `.tasks/tasks.jsonl` file is git-tracked. When you: -- Create/update tasks locally -- Commit and push -- Other machines/agents get the updates on `git pull` - -**Important**: Add to `.gitignore`: -``` -.tasks/*.db -.tasks/*.db-journal -.tasks/*.sock -``` - -But **do** track: -``` -!.tasks/ -!.tasks/tasks.jsonl -``` - ## Troubleshooting ### "Task not found" |
