@vib795/agent-memory 0.6.1 → 0.6.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/package.json +1 -1
- package/skills/handoff/SKILL.md +64 -8
- package/skills/remember/SKILL.md +14 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vib795/agent-memory",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "Durable cross-repo knowledge graph for GitHub Copilot and Claude Code. Markdown source of truth, disposable SQLite index, zero runtime dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"github-copilot",
|
package/skills/handoff/SKILL.md
CHANGED
|
@@ -55,6 +55,10 @@ Write-Output "--- GIT ---"
|
|
|
55
55
|
Write-Output "ROOT=$(git rev-parse --show-toplevel 2>$null)"
|
|
56
56
|
Write-Output "BRANCH=$(git branch --show-current 2>$null)"
|
|
57
57
|
Write-Output "HEAD=$(git rev-parse --short HEAD 2>$null)"
|
|
58
|
+
Write-Output "--- BRANCHES ---"
|
|
59
|
+
git branch --sort=-committerdate --format='%(refname:short)' 2>$null | Select-Object -First 10
|
|
60
|
+
Write-Output "--- LOG ---"
|
|
61
|
+
git log --oneline -8 2>$null
|
|
58
62
|
Write-Output "--- STATUS ---"
|
|
59
63
|
git status --porcelain 2>$null
|
|
60
64
|
Write-Output "UTC=$([DateTime]::UtcNow.ToString('yyyy-MM-ddTHH:mm:ssZ'))"
|
|
@@ -70,6 +74,8 @@ echo "--- GIT ---"
|
|
|
70
74
|
echo "ROOT=$(git rev-parse --show-toplevel 2>/dev/null)"
|
|
71
75
|
echo "BRANCH=$(git branch --show-current 2>/dev/null)"
|
|
72
76
|
echo "HEAD=$(git rev-parse --short HEAD 2>/dev/null)"
|
|
77
|
+
echo "--- BRANCHES ---"; git branch --sort=-committerdate --format='%(refname:short)' 2>/dev/null | head -10
|
|
78
|
+
echo "--- LOG ---"; git log --oneline -8 2>/dev/null
|
|
73
79
|
echo "--- STATUS ---"; git status --porcelain 2>/dev/null
|
|
74
80
|
echo "UTC=$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
75
81
|
```
|
|
@@ -77,6 +83,12 @@ echo "UTC=$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
|
77
83
|
If the directory is not a git repository, `ROOT`/`BRANCH`/`HEAD` come back empty.
|
|
78
84
|
That is not an error. Record the working directory path and omit the git fields.
|
|
79
85
|
|
|
86
|
+
`BRANCHES` is there because the current branch is rarely the whole story. Work that
|
|
87
|
+
stages a change across two branches — one holding the old configuration for a first
|
|
88
|
+
run, another carrying the new one — leaves the second branch invisible to
|
|
89
|
+
`--show-current`, and a branch you were never shown is a branch you cannot record.
|
|
90
|
+
Read the list before writing Execution protocol.
|
|
91
|
+
|
|
80
92
|
---
|
|
81
93
|
|
|
82
94
|
## Step 2 — Identify the thread
|
|
@@ -132,6 +144,17 @@ Written for a reader with zero prior context.
|
|
|
132
144
|
Things not discoverable by reading the code: environment restrictions,
|
|
133
145
|
unavailable tooling, plan limits, deadlines, taste calls already settled.
|
|
134
146
|
|
|
147
|
+
## Execution protocol
|
|
148
|
+
|
|
149
|
+
The sequence this work is run in, when the sequence is not obvious from the code.
|
|
150
|
+
Branch choreography, pipeline order, which environment goes first, what has to be
|
|
151
|
+
staged before what, what must be true before a step is safe to repeat.
|
|
152
|
+
|
|
153
|
+
Write the shape of the operation, not this run's position in it. "Run the pipeline
|
|
154
|
+
from a branch holding the old configuration, then from the working branch with the
|
|
155
|
+
new one" belongs here. "Dev is done, UAT is next" does not — that is Current task
|
|
156
|
+
state. Mandatory. `None.` when the work genuinely has no ordering.
|
|
157
|
+
|
|
135
158
|
## Rejected approaches
|
|
136
159
|
|
|
137
160
|
What was tried and why it failed. Mandatory. This is the section that stops the
|
|
@@ -175,7 +198,8 @@ These separate a useful handoff from a readable paragraph that still leaves ques
|
|
|
175
198
|
inferred with `inferred:` so the next agent knows to verify it.
|
|
176
199
|
6. Never inline a diff or a patch. List changed files with one line each.
|
|
177
200
|
7. Soft target 150 lines. On overflow, move detail into `<id>.detail.md` and
|
|
178
|
-
reference it. Never drop Decisions or Rejected approaches
|
|
201
|
+
reference it. Never drop Decisions, Execution protocol, or Rejected approaches
|
|
202
|
+
to hit the target.
|
|
179
203
|
8. Empty sections say `None.` They are never deleted. A missing section reads as
|
|
180
204
|
an oversight; an explicit `None.` reads as a fact.
|
|
181
205
|
|
|
@@ -252,6 +276,13 @@ request, which is the only reason this step belongs here rather than in its own
|
|
|
252
276
|
<!-- extraction-rules:start -->
|
|
253
277
|
- A node is durable only if it will still be true next month. Task state is not
|
|
254
278
|
durable and belongs in a handoff file, not in the graph.
|
|
279
|
+
- A repeatable **procedure** is durable even though it reads like task state, and it
|
|
280
|
+
is the exception most often missed. "Run the pipeline from a branch holding the old
|
|
281
|
+
configuration, then from the working branch carrying the new one" is a `convention`:
|
|
282
|
+
it will be true the next time anyone does this. The test is whether the sentence
|
|
283
|
+
describes *this run* — not durable — or *how this kind of run is done* — durable.
|
|
284
|
+
Branch choreography, deploy ordering and staging sequences all pass that test and
|
|
285
|
+
are routinely dropped because the previous rule makes them look like status.
|
|
255
286
|
- Every `decision` node carries its why and its rejected alternatives, or it is not
|
|
256
287
|
written. Rationale is the thing that never survives re-explanation.
|
|
257
288
|
- Anything the conversation did not actually establish is `confidence: inferred`,
|
|
@@ -303,7 +334,19 @@ describe the same thing and the user should know.
|
|
|
303
334
|
|
|
304
335
|
---
|
|
305
336
|
|
|
306
|
-
## Step 8 — Print the pickup
|
|
337
|
+
## Step 8 — Print the pickup lines
|
|
338
|
+
|
|
339
|
+
Two different jobs pick up a handoff, and one line cannot serve both.
|
|
340
|
+
|
|
341
|
+
**Continuing** is the same work in another window: same repository, same branch, the
|
|
342
|
+
Next action is the next thing to do.
|
|
343
|
+
|
|
344
|
+
**Replicating** is the same *kind* of work in a different repository. There the Next
|
|
345
|
+
action is wrong by construction — it names branches, paths and environments that
|
|
346
|
+
belong to the repo this file was written in. An agent told to "follow the Next
|
|
347
|
+
action" in a different repo will either execute the wrong step or go read the
|
|
348
|
+
original repo off disk to work out what was meant, and both burn the user's credits
|
|
349
|
+
to arrive somewhere worse than a cold start.
|
|
307
350
|
|
|
308
351
|
End your reply with exactly this, and nothing after it:
|
|
309
352
|
|
|
@@ -311,21 +354,34 @@ End your reply with exactly this, and nothing after it:
|
|
|
311
354
|
Handoff written: <absolute path to id.md>
|
|
312
355
|
Thread: <id> (<created|updated>)
|
|
313
356
|
|
|
314
|
-
|
|
357
|
+
Continue in another window (same repo):
|
|
315
358
|
Read <absolute path to id.md> and continue this work. Follow the Next action.
|
|
359
|
+
|
|
360
|
+
Replicate in a different repo:
|
|
361
|
+
Read <absolute path to id.md>. It describes work done in <repo name>. Do the
|
|
362
|
+
equivalent here: follow Execution protocol, and re-derive every specific — branch
|
|
363
|
+
names, file paths, module versions — from this repository. Do not open <repo name>
|
|
364
|
+
and do not assume its Next action applies. Tell me the plan before you edit.
|
|
316
365
|
```
|
|
317
366
|
|
|
367
|
+
Print both. The user knows which window they are pasting into; you do not.
|
|
368
|
+
|
|
318
369
|
---
|
|
319
370
|
|
|
320
371
|
## Self-check before you write
|
|
321
372
|
|
|
322
|
-
Answer all
|
|
373
|
+
Answer all six. If any is no, fix the file before writing it.
|
|
323
374
|
|
|
324
375
|
1. Could a fresh agent execute **Next action** from this file alone?
|
|
325
|
-
2.
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
376
|
+
2. Could an agent **in a different repository** replicate this work from this file
|
|
377
|
+
alone, without opening the repo it was written in? If it would have to go read
|
|
378
|
+
the original source to understand the shape of the change, Execution protocol is
|
|
379
|
+
too thin. This is the question that catches a handoff which reads well and is
|
|
380
|
+
still not portable.
|
|
381
|
+
3. Does every decision state why, and what was rejected?
|
|
382
|
+
4. Is Rejected approaches non-empty, or explicitly `None.`?
|
|
383
|
+
5. Is every claim anchored to a path or a decision number?
|
|
384
|
+
6. Is there a single secret, token, or connection string left in the body?
|
|
329
385
|
|
|
330
386
|
---
|
|
331
387
|
|
package/skills/remember/SKILL.md
CHANGED
|
@@ -41,8 +41,14 @@ Invoke this yourself the moment one of these has just happened, in the same turn
|
|
|
41
41
|
|
|
42
42
|
- a **decision** was settled, and the reasons and rejected options are still in view
|
|
43
43
|
- a **constraint** surfaced — a blocked tool, a policy, an environment restriction
|
|
44
|
+
- a **tool you reached for was not there** — not on `PATH`, not installed, not
|
|
45
|
+
permitted. A command that failed because the machine does not have it is a
|
|
46
|
+
`constraint`, and an unrecorded one is a tool call you will spend again in every
|
|
47
|
+
future session on that machine
|
|
44
48
|
- a **root cause** was found, as opposed to a symptom worked around
|
|
45
49
|
- a **convention** was agreed, or discovered by reading the code
|
|
50
|
+
- a **procedure** ran end to end and worked — the order of the steps is now known,
|
|
51
|
+
and it is about to be forgotten
|
|
46
52
|
|
|
47
53
|
Do not capture on a timer, on a tool count, or at every reply. Those produce volume,
|
|
48
54
|
and volume is what makes a graph useless — a store full of task chatter is worse than
|
|
@@ -78,6 +84,13 @@ most turns.
|
|
|
78
84
|
<!-- extraction-rules:start -->
|
|
79
85
|
- A node is durable only if it will still be true next month. Task state is not
|
|
80
86
|
durable and belongs in a handoff file, not in the graph.
|
|
87
|
+
- A repeatable **procedure** is durable even though it reads like task state, and it
|
|
88
|
+
is the exception most often missed. "Run the pipeline from a branch holding the old
|
|
89
|
+
configuration, then from the working branch carrying the new one" is a `convention`:
|
|
90
|
+
it will be true the next time anyone does this. The test is whether the sentence
|
|
91
|
+
describes *this run* — not durable — or *how this kind of run is done* — durable.
|
|
92
|
+
Branch choreography, deploy ordering and staging sequences all pass that test and
|
|
93
|
+
are routinely dropped because the previous rule makes them look like status.
|
|
81
94
|
- Every `decision` node carries its why and its rejected alternatives, or it is not
|
|
82
95
|
written. Rationale is the thing that never survives re-explanation.
|
|
83
96
|
- Anything the conversation did not actually establish is `confidence: inferred`,
|
|
@@ -97,7 +110,7 @@ Types:
|
|
|
97
110
|
|---|---|
|
|
98
111
|
| `system` | how a thing works, anchored to a `path:line` |
|
|
99
112
|
| `decision` | what was chosen, why, and what was rejected |
|
|
100
|
-
| `convention` | how this codebase does something, and the gotcha |
|
|
113
|
+
| `convention` | how this codebase does something, and the gotcha — including multi-step procedures, branch choreography, and deploy ordering |
|
|
101
114
|
| `constraint` | what the environment or the org forbids |
|
|
102
115
|
|
|
103
116
|
---
|