@iamem/amem 0.1.1 → 0.1.3
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/README.md +98 -4
- package/desktop/icons/icon-1024.png +0 -0
- package/desktop/icons/icon.icns +0 -0
- package/desktop/icons/icon.png +0 -0
- package/desktop/main.js +100 -0
- package/desktop/package.json +16 -0
- package/desktop/preload.js +4 -0
- package/desktop/scripts/ensure-electron.mjs +122 -0
- package/dist/api/routes.js +331 -1
- package/dist/app-shell.d.ts +13 -0
- package/dist/app-shell.js +126 -0
- package/dist/attest.d.ts +13 -0
- package/dist/attest.js +44 -0
- package/dist/cli.js +258 -2
- package/dist/context.d.ts +10 -1
- package/dist/context.js +105 -3
- package/dist/db.d.ts +141 -0
- package/dist/db.js +398 -0
- package/dist/embed.js +5 -14
- package/dist/hook.js +8 -1
- package/dist/hygiene.d.ts +1 -2
- package/dist/hygiene.js +1 -2
- package/dist/install/hosts.js +8 -0
- package/dist/install/skills.js +10 -5
- package/dist/license.d.ts +1 -0
- package/dist/license.js +21 -19
- package/dist/mcp.js +221 -0
- package/dist/policy.d.ts +6 -0
- package/dist/policy.js +16 -1
- package/dist/publish.d.ts +1 -1
- package/dist/publish.js +1 -0
- package/dist/skill-capture.d.ts +43 -0
- package/dist/skill-capture.js +146 -0
- package/dist/skills.d.ts +106 -0
- package/dist/skills.js +422 -0
- package/docs/backlog.md +9 -0
- package/docs/npm-release.md +1 -1
- package/package.json +7 -2
- package/scripts/postinstall.js +62 -0
- package/skills/amem-tasks/SKILL.md +100 -0
- package/skills/amem-write-skill/SKILL.md +99 -0
- package/templates/cursor-rule.mdc +16 -6
- package/templates/policy.deny-default.toml +5 -0
- package/templates/policy.example.toml +8 -0
- package/ui-static/app.js +435 -227
- package/ui-static/index.html +11 -34
- package/ui-static/styles.css +299 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: amem-write-skill
|
|
3
|
+
description: Write a durable procedure from this session into local amem skills.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# amem-write-skill
|
|
7
|
+
|
|
8
|
+
Turn a non-trivial workflow you just worked out into a reusable skill stored in local amem.
|
|
9
|
+
|
|
10
|
+
Use this when an amem context packet shows a **Worth saving as a skill** or **Skill worth
|
|
11
|
+
revising** nudge, or when you notice on your own that you solved something worth repeating.
|
|
12
|
+
|
|
13
|
+
## Privacy
|
|
14
|
+
|
|
15
|
+
- Skills are stored locally under `~/.amem/skills` and never leave this machine.
|
|
16
|
+
- Do not store secrets, tokens, credentials, connection strings, or private personal data.
|
|
17
|
+
amem scans content and will refuse writes that look like credentials.
|
|
18
|
+
- Do not paste proprietary company LLM instructions — write the procedure, not the prompt.
|
|
19
|
+
|
|
20
|
+
## When to write one
|
|
21
|
+
|
|
22
|
+
Write a skill when at least one of these is true:
|
|
23
|
+
|
|
24
|
+
- You worked out a multi-step workflow that will come up again.
|
|
25
|
+
- You hit errors or dead ends and found the path that actually works.
|
|
26
|
+
- The user corrected your approach and the correction generalizes.
|
|
27
|
+
|
|
28
|
+
Do **not** write a skill for a one-off fix, a single command, or anything already obvious
|
|
29
|
+
from the repo's README. A small durable fact belongs in memory (`amem_remember`), not here.
|
|
30
|
+
The split: memory holds facts that should always be in context; skills hold procedures that
|
|
31
|
+
should load only when relevant.
|
|
32
|
+
|
|
33
|
+
## Steps
|
|
34
|
+
|
|
35
|
+
1. Check what already exists so you update instead of duplicating:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
amem skills list
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If a related skill exists, load it and revise it rather than writing a second one:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
amem skills show <name>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
2. Draft the SKILL.md. Keep the description under about 80 characters — it is the only
|
|
48
|
+
thing agents see until they load the body, so it must say *when to use this*, not just
|
|
49
|
+
what it is.
|
|
50
|
+
|
|
51
|
+
3. Save it with the `amem_skill_save` MCP tool, passing `name`, `description`, and
|
|
52
|
+
`content`. Prefer that over writing files directly so the content scan runs.
|
|
53
|
+
|
|
54
|
+
## Format
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
---
|
|
58
|
+
name: deploy-staging
|
|
59
|
+
description: Deploy the staging server and verify the health endpoint
|
|
60
|
+
tags: [deploy, staging]
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
# Deploy Staging
|
|
64
|
+
|
|
65
|
+
## When to use
|
|
66
|
+
Trigger conditions — the situation where this procedure applies.
|
|
67
|
+
|
|
68
|
+
## Procedure
|
|
69
|
+
1. Concrete step with the real command.
|
|
70
|
+
2. Next step.
|
|
71
|
+
|
|
72
|
+
## Pitfalls
|
|
73
|
+
- The dead end you hit, and what got you past it.
|
|
74
|
+
|
|
75
|
+
## Verification
|
|
76
|
+
How to confirm it actually worked.
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Pitfalls
|
|
80
|
+
|
|
81
|
+
- **Vague descriptions.** "Helps with deploys" is useless for ranking. Name the trigger.
|
|
82
|
+
- **Transcribing the chat.** Write the procedure that worked, not the exploration that led
|
|
83
|
+
to it. Skip the wrong turns except as entries under Pitfalls.
|
|
84
|
+
- **Inventing steps.** Only include commands you actually ran and saw work.
|
|
85
|
+
- **Duplicates.** Revising an existing skill beats adding a near-copy.
|
|
86
|
+
|
|
87
|
+
## Verification
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
amem skills list # your skill appears with its description
|
|
91
|
+
amem skills show <name> # body reads as a procedure someone else could follow
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
If a write is staged instead of saved, an approval gate is on. Review it with:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
amem skills drafts
|
|
98
|
+
amem skills approve <draft-id>
|
|
99
|
+
```
|
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Use local personal amem memory before broad codebase exploration
|
|
2
|
+
description: Use local personal amem memory and tasks before broad codebase exploration
|
|
3
3
|
globs:
|
|
4
4
|
alwaysApply: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- Generated by amem. Safe to commit: contains no memory contents. -->
|
|
8
8
|
|
|
9
|
-
# amem local memory
|
|
9
|
+
# amem local memory & tasks
|
|
10
10
|
|
|
11
|
-
amem injects matching local memory into Cursor automatically (session start + each prompt). Treat that packet as the first map of this repo.
|
|
11
|
+
amem injects matching local memory and open tasks into Cursor automatically (session start + each prompt). Treat that packet as the first map of this repo.
|
|
12
12
|
|
|
13
13
|
1. Prefer amem file anchors over broad greps and multi-folder reads.
|
|
14
14
|
2. Still verify current code before editing — memory can be stale. Trust **fresh** claims more; re-check anything marked **stale**.
|
|
15
15
|
3. Use the **Why:** line as ranking explainability, not as proof.
|
|
16
|
-
4.
|
|
17
|
-
|
|
16
|
+
4. **Agent Tasks & Kanban:**
|
|
17
|
+
- Use `amem_task_add` to record deferred work, follow-ups, or multi-step tasks so they don't get lost across chat sessions.
|
|
18
|
+
- Update tasks to `doing` with `amem_task_update` when starting work.
|
|
19
|
+
- Mark completed tasks with `amem_task_complete` as soon as finished so completed tasks are preserved in history and context retrieval.
|
|
20
|
+
- Query `amem_task_list` (or check `## Open tasks` in context) to see pending and completed tasks.
|
|
21
|
+
5. **Skills (procedural memory):**
|
|
22
|
+
- A `## Relevant skills` section lists names and descriptions only. If one looks like it applies, call `amem_skill_view` to load the procedure **before** working it out yourself.
|
|
23
|
+
- When you solve something worth repeating — a multi-step workflow, a dead end you found the way past, or a correction the user gave you — save it with `amem_skill_save`. The `amem-write-skill` skill has the format.
|
|
24
|
+
- A `## Worth saving as a skill` or `## Skill worth revising` note in the packet means amem already spotted one. Write it up if you agree; it is a suggestion, not an order.
|
|
25
|
+
- Skills are procedures. Small durable facts still belong in memory via `amem_remember`.
|
|
26
|
+
6. After durable learnings, the stop hook queues a compact **session draft** (and may queue **miss→learn** drafts). Approve in `amem ui` → Memory, or run `amem-update-working-memory` for higher-quality facts.
|
|
27
|
+
7. Cross-repo personal prefs may appear with Why reason `personal` — they are local “how I work” notes, not org wiki.
|
|
18
28
|
|
|
19
29
|
Do not re-run `amem context` unless the injected packet is empty or clearly wrong.
|
|
20
30
|
|
|
21
31
|
Memory is personal and stored under `~/.amem` on this machine. Do not commit exports, backups, or database copies to shared remotes.
|
|
22
32
|
|
|
23
|
-
Open the local UI anytime with `amem ui` (Setup, Memory drafts, Stats).
|
|
33
|
+
Open the local UI anytime with `amem ui` (Setup, Memory drafts, Tasks, Skills, Stats).
|
|
@@ -18,3 +18,8 @@ allowed_platforms = ["cursor", "claude"]
|
|
|
18
18
|
|
|
19
19
|
# Empty = Memory must approve every draft. Do not auto-apply on managed fleets.
|
|
20
20
|
auto_apply_kinds = []
|
|
21
|
+
|
|
22
|
+
# Skills are instructions agents follow, so nothing reaches disk without a human.
|
|
23
|
+
skills_enabled = true
|
|
24
|
+
skill_write_approval = true
|
|
25
|
+
skill_capture = true
|
|
@@ -20,3 +20,11 @@ allowed_platforms = ["cursor", "claude"]
|
|
|
20
20
|
# Optional: auto-apply low-risk draft kinds without Memory approve (empty = never).
|
|
21
21
|
# Prefer leaving this empty on managed fleets.
|
|
22
22
|
# auto_apply_kinds = ["structure"]
|
|
23
|
+
|
|
24
|
+
# Skills — reusable procedures agents load on demand from ~/.amem/skills.
|
|
25
|
+
# These are instructions an agent will follow, so treat them like code, not notes.
|
|
26
|
+
skills_enabled = true
|
|
27
|
+
# true = agent writes are staged for review instead of hitting disk.
|
|
28
|
+
skill_write_approval = false
|
|
29
|
+
# false = stop suggesting skills at session end.
|
|
30
|
+
skill_capture = true
|