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.
- package/bin/eagle-mem +4 -0
- package/db/004_observation_indexes.sql +9 -0
- package/db/migrate.sh +3 -0
- package/db/schema.sql +2 -0
- package/hooks/post-tool-use.sh +4 -4
- package/hooks/session-start.sh +6 -29
- package/hooks/stop.sh +3 -5
- package/hooks/user-prompt-submit.sh +4 -19
- package/lib/common.sh +13 -0
- package/lib/db.sh +84 -9
- package/package.json +1 -1
- package/scripts/help.sh +17 -7
- package/scripts/install.sh +6 -15
- package/scripts/overview.sh +170 -0
- package/scripts/prune.sh +154 -0
- package/scripts/search.sh +294 -0
- package/scripts/tasks.sh +291 -0
- package/scripts/uninstall.sh +5 -5
- package/scripts/update.sh +5 -5
- package/skills/eagle-mem-overview/SKILL.md +35 -55
- package/skills/eagle-mem-search/SKILL.md +36 -84
- package/skills/eagle-mem-tasks/SKILL.md +40 -63
|
@@ -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'.
|
|
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**:
|
|
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
|
-
###
|
|
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
|
-
|
|
27
|
+
eagle-mem tasks
|
|
28
|
+
eagle-mem tasks list
|
|
35
29
|
```
|
|
36
30
|
|
|
37
|
-
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
###
|
|
48
|
+
### Complete a task
|
|
51
49
|
|
|
52
50
|
```bash
|
|
53
|
-
|
|
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
|
-
|
|
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
|
-
|
|
58
|
+
### Block a task
|
|
63
59
|
|
|
64
|
-
1. Mark it complete:
|
|
65
60
|
```bash
|
|
66
|
-
|
|
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
|
-
|
|
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
|
-
|
|
66
|
+
For tasks that depend on decisions from earlier tasks:
|
|
77
67
|
|
|
78
68
|
```bash
|
|
79
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|