docs(tasks): update AGENTS.md for global storage architecture
This commit is contained in:
parent
d66e39a887
commit
1712907057
@ -54,7 +54,26 @@ The task system includes a sync layer (`todo-sync.ts`) that automatically mirror
|
|||||||
|
|
||||||
### getTaskDir(config)
|
### 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)
|
### readJsonSafe(filePath, schema)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user