docs(tasks): update AGENTS.md for global storage architecture

This commit is contained in:
YeonGyu-Kim 2026-02-04 15:15:08 +09:00
parent d66e39a887
commit 1712907057

View File

@ -54,7 +54,26 @@ The task system includes a sync layer (`todo-sync.ts`) that automatically mirror
### getTaskDir(config)
Returns: `.sisyphus/tasks` (or custom path from config)
Returns the task storage directory path.
**Default behavior (no config override):**
Returns `~/.config/opencode/tasks/<task-list-id>/` where:
- Task list ID is resolved via `resolveTaskListId()`
**With `storage_path` config:**
- Absolute paths (starting with `/`) are returned as-is
- Relative paths are joined with `process.cwd()`
### resolveTaskListId(config)
Resolves the task list ID for directory scoping.
**Priority order:**
1. `ULTRAWORK_TASK_LIST_ID` environment variable
2. `config.sisyphus?.tasks?.task_list_id` config option
3. Sanitized `basename(process.cwd())` as fallback
**Sanitization:** Replaces non-alphanumeric characters (except `-` and `_`) with `-`
### readJsonSafe(filePath, schema)