2026-02-17 11:17:01 +09:00
|
|
|
# src/features/claude-tasks/ — Task Schema + Storage
|
2026-02-01 22:42:28 +09:00
|
|
|
|
2026-04-11 22:32:23 +09:00
|
|
|
**Generated:** 2026-04-11
|
2026-02-01 22:42:28 +09:00
|
|
|
|
2026-02-17 11:17:01 +09:00
|
|
|
## OVERVIEW
|
2026-02-01 22:42:28 +09:00
|
|
|
|
2026-02-17 11:17:01 +09:00
|
|
|
4 non-test files (~622 LOC). File-based task persistence with atomic writes, locking, and OpenCode todo API sync.
|
2026-02-01 22:42:28 +09:00
|
|
|
|
|
|
|
|
## TASK SCHEMA
|
|
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
|
interface Task {
|
2026-02-17 11:17:01 +09:00
|
|
|
id: string // T-{uuid} auto-generated
|
|
|
|
|
subject: string // Short title
|
|
|
|
|
description?: string // Detailed description
|
|
|
|
|
status: "pending" | "in_progress" | "completed" | "deleted"
|
|
|
|
|
activeForm?: string // Current form/template
|
|
|
|
|
blocks?: string[] // Tasks this blocks
|
|
|
|
|
blockedBy?: string[] // Tasks blocking this
|
|
|
|
|
owner?: string // Agent/session
|
2026-02-01 22:42:28 +09:00
|
|
|
metadata?: Record<string, unknown>
|
2026-02-17 11:17:01 +09:00
|
|
|
repoURL?: string // Associated repository
|
|
|
|
|
parentID?: string // Parent task ID
|
|
|
|
|
threadID?: string // Session ID (auto-recorded)
|
2026-02-01 22:42:28 +09:00
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2026-02-17 11:17:01 +09:00
|
|
|
## FILES
|
2026-02-10 16:43:54 +09:00
|
|
|
|
2026-02-17 11:17:01 +09:00
|
|
|
| File | Purpose |
|
|
|
|
|
|------|---------|
|
|
|
|
|
| `types.ts` | Task interface + status types |
|
|
|
|
|
| `storage.ts` | `readJsonSafe()`, `writeJsonAtomic()`, `acquireLock()`, `generateTaskId()` |
|
|
|
|
|
| `session-storage.ts` | Per-session task storage, threadID auto-recording |
|
|
|
|
|
| `index.ts` | Barrel exports |
|
2026-02-10 16:43:54 +09:00
|
|
|
|
2026-02-17 11:17:01 +09:00
|
|
|
## STORAGE
|
2026-02-01 22:42:28 +09:00
|
|
|
|
2026-02-17 11:17:01 +09:00
|
|
|
- Location: `.sisyphus/tasks/` directory
|
|
|
|
|
- Format: JSON files, one per task
|
|
|
|
|
- Atomic writes: temp file → rename
|
|
|
|
|
- Locking: file-based lock for concurrent access
|
|
|
|
|
- Sync: Changes pushed to OpenCode Todo API after each update
|