eagle-mem 1.0.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,8 +3,7 @@ name: eagle-mem-tasks
3
3
  description: >
4
4
  TaskAware Compact Loop — break complex work into database-tracked subtasks with compaction
5
5
  between each. Use when: 'eagle tasks', 'break this into tasks', 'create task plan',
6
- 'task loop', 'compact loop', 'eagle mem tasks'. Prevents context bloat and hallucination
7
- by executing one task at a time with memory re-injection after each /compact.
6
+ 'task loop', 'compact loop', 'eagle mem tasks'. Uses the eagle-mem CLI — never run raw sqlite3 queries.
8
7
  ---
9
8
 
10
9
  # Eagle Mem — TaskAware Compact Loop
@@ -14,7 +13,7 @@ Break complex work into subtasks stored in Eagle Mem's database. Execute one tas
14
13
  ## How it works
15
14
 
16
15
  1. **Plan**: Break the user's request into ordered subtasks
17
- 2. **Store**: Write each subtask to the Eagle Mem database
16
+ 2. **Store**: Add each subtask via the CLI
18
17
  3. **Execute**: Work on the current task (marked `[ACTIVE]`)
19
18
  4. **Compact**: When done, tell the user to run `/compact`
20
19
  5. **Resume**: After compact, SessionStart re-injects memory + loads the next task
@@ -22,78 +21,72 @@ Break complex work into subtasks stored in Eagle Mem's database. Execute one tas
22
21
 
23
22
  ## Commands
24
23
 
25
- ### Creating tasks
26
-
27
- When the user invokes `/eagle-mem-tasks` or asks to break work into tasks:
28
-
29
- 1. Analyze the request and break it into 3-8 focused subtasks
30
- 2. Each task should be completable in one context window (~50-100K tokens of work)
31
- 3. Write tasks to the database using this pattern:
24
+ ### List tasks
32
25
 
33
26
  ```bash
34
- ~/.eagle-mem/db/task-ops.sh add "<project>" "<title>" "<instructions>" <ordinal>
27
+ eagle-mem tasks
28
+ eagle-mem tasks list
35
29
  ```
36
30
 
37
- If `task-ops.sh` doesn't exist yet, write directly:
31
+ ### Add tasks
32
+
33
+ When the user invokes `/eagle-mem-tasks` or asks to break work into tasks:
34
+
35
+ 1. Analyze the request and break it into 3-8 focused subtasks
36
+ 2. Each task should be completable in one context window
37
+ 3. Add tasks using the CLI:
38
38
 
39
39
  ```bash
40
- sqlite3 ~/.eagle-mem/memory.db "
41
- PRAGMA trusted_schema=ON;
42
- INSERT INTO tasks (project, title, instructions, ordinal)
43
- VALUES ('<project>', '<title>', '<instructions>', <ordinal>);
44
- "
40
+ eagle-mem tasks add "Set up project structure" "Install deps, create folders, init config"
41
+ eagle-mem tasks add "Implement auth middleware" "JWT validation, role checks, error responses"
42
+ eagle-mem tasks add "Build CRUD endpoints" "Users and posts REST API with validation"
45
43
  ```
46
44
 
47
45
  4. Show the task plan to the user for confirmation
48
46
  5. After confirmation, start working on task #1
49
47
 
50
- ### Viewing tasks
48
+ ### Complete a task
51
49
 
52
50
  ```bash
53
- sqlite3 ~/.eagle-mem/memory.db "
54
- SELECT id, title, status, ordinal FROM tasks
55
- WHERE project = '<project>'
56
- ORDER BY ordinal ASC, id ASC;
57
- "
51
+ eagle-mem tasks done <id>
58
52
  ```
59
53
 
60
- ### Completing a task
54
+ After marking done:
55
+ 1. Emit your `<eagle-summary>` block
56
+ 2. Tell the user: **"Task #N complete. Run `/compact` to save progress and load the next task."**
61
57
 
62
- When the current task is done:
58
+ ### Block a task
63
59
 
64
- 1. Mark it complete:
65
60
  ```bash
66
- sqlite3 ~/.eagle-mem/memory.db "
67
- PRAGMA trusted_schema=ON;
68
- UPDATE tasks SET status = 'done', completed_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
69
- WHERE id = <task_id>;
70
- "
61
+ eagle-mem tasks block <id>
71
62
  ```
72
63
 
73
- 2. Emit your `<eagle-summary>` block
74
- 3. Tell the user: **"Task #N complete. Run `/compact` to save progress and load the next task."**
64
+ ### Set context snapshot
75
65
 
76
- ### Skipping/blocking a task
66
+ For tasks that depend on decisions from earlier tasks:
77
67
 
78
68
  ```bash
79
- sqlite3 ~/.eagle-mem/memory.db "
80
- UPDATE tasks SET status = 'blocked'
81
- WHERE id = <task_id>;
82
- "
69
+ eagle-mem tasks context <id> "Using JWT with RS256, sessions stored in Redis"
83
70
  ```
84
71
 
85
- ## Task design guidelines
72
+ ### Clear completed tasks
86
73
 
87
- - Each task should be **self-contained** — completable without needing context from mid-execution of a previous task
88
- - Include `instructions` with enough detail that a fresh context window can pick it up
89
- - Include a `context_snapshot` for tasks that depend on decisions from earlier tasks:
90
74
  ```bash
91
- sqlite3 ~/.eagle-mem/memory.db "
92
- PRAGMA trusted_schema=ON;
93
- UPDATE tasks SET context_snapshot = '<key decisions and state>'
94
- WHERE id = <task_id>;
95
- "
75
+ eagle-mem tasks clear
96
76
  ```
77
+
78
+ ## Options
79
+
80
+ | Flag | Description |
81
+ |------|-------------|
82
+ | `-p, --project <name>` | Target a specific project (default: current directory) |
83
+ | `-j, --json` | Output as JSON |
84
+
85
+ ## Task design guidelines
86
+
87
+ - Each task should be **self-contained** — completable without mid-execution context from a previous task
88
+ - Include instructions with enough detail that a fresh context window can pick it up
89
+ - Use context snapshots for tasks that depend on decisions from earlier tasks
97
90
  - Order tasks so that foundational work comes first (schema before API, API before UI)
98
91
 
99
92
  ## The compact cycle
@@ -105,19 +98,3 @@ User request → Plan tasks → Execute task 1 → /compact
105
98
  → ... repeat until all tasks done ...
106
99
  → Final summary: "All N tasks complete."
107
100
  ```
108
-
109
- This prevents context window bloat. Each task gets a fresh window with only relevant memory injected.
110
-
111
- ## Example
112
-
113
- User: "Build a REST API with auth, CRUD endpoints, and tests"
114
-
115
- Tasks created:
116
- 1. Set up project structure and dependencies
117
- 2. Implement auth middleware (JWT)
118
- 3. Build CRUD endpoints for users
119
- 4. Build CRUD endpoints for posts
120
- 5. Write integration tests
121
- 6. Add error handling and validation
122
-
123
- Each task executes in its own compact cycle with full memory of what came before.