@fyso/awareness-framework 0.1.0 → 0.3.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/README.md +4 -0
- package/docs/cli.md +33 -1
- package/docs/evaluation-loop.md +2 -0
- package/docs/hooks-and-scheduling.md +8 -2
- package/docs/memory.md +17 -0
- package/docs/superpowers/plans/2026-06-19-local-memory-operations.md +1026 -0
- package/package.json +1 -1
- package/src/cli.js +478 -6
- package/templates/agent-instructions.md +15 -6
- package/templates/cli-wrapper.md +1 -1
- package/templates/end-of-day-summary.md +8 -0
- package/templates/evaluation-note.md +4 -1
- package/templates/memory-long-term.md +15 -1
package/README.md
CHANGED
|
@@ -46,6 +46,7 @@ Personality is treated as a private operating profile: continuity, voice, contex
|
|
|
46
46
|
preferences.md
|
|
47
47
|
patterns.md
|
|
48
48
|
long-term.md
|
|
49
|
+
events.jsonl
|
|
49
50
|
users/
|
|
50
51
|
<user>.md
|
|
51
52
|
evaluations/
|
|
@@ -107,6 +108,9 @@ awareness refresh
|
|
|
107
108
|
awareness check
|
|
108
109
|
awareness hook install --tool all --command "$(command -v awareness)"
|
|
109
110
|
awareness schedule install --cadence all --command "$(command -v awareness)"
|
|
111
|
+
awareness remember --text "Useful local observation" --evidence "Source"
|
|
112
|
+
awareness recall "local observation"
|
|
113
|
+
awareness improve
|
|
110
114
|
```
|
|
111
115
|
|
|
112
116
|
The CLI only reads and writes private local files. It does not post to Jira, GitHub, or any external system.
|
package/docs/cli.md
CHANGED
|
@@ -186,7 +186,39 @@ awareness evaluate --print
|
|
|
186
186
|
awareness evaluate --force
|
|
187
187
|
```
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
When an evaluation is written, the CLI also records low-risk promotion candidates in `memory/long-term.md`. It does not silently promote candidates into durable rules; use `awareness memory promote` after review.
|
|
190
|
+
|
|
191
|
+
### `memory`
|
|
192
|
+
|
|
193
|
+
Reviews and promotes long-term memory.
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
awareness memory candidates
|
|
197
|
+
awareness memory review
|
|
198
|
+
awareness memory review --min-count 3
|
|
199
|
+
awareness memory note --text "User prefers active memory review" --evidence "Direct request"
|
|
200
|
+
awareness memory promote --kind preference --text "Surface memory candidates proactively" --evidence "User confirmed"
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
`memory review` scans promotion candidates and suggests repeated candidates as `pattern` promotions once they appear at least twice by default.
|
|
204
|
+
|
|
205
|
+
Valid promotion kinds are `preference`, `pattern`, `project`, and `review`.
|
|
206
|
+
|
|
207
|
+
### Local memory operations
|
|
208
|
+
|
|
209
|
+
These commands provide a small Cognee-inspired operation vocabulary without adding a graph database or vector store.
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
awareness remember --text "Prefer recall before repeating implementation work" --evidence "User request"
|
|
213
|
+
awareness recall "implementation work"
|
|
214
|
+
awareness forget --text "Old assumption" --reason "Superseded by user correction" --evidence "Correction message"
|
|
215
|
+
awareness improve
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
`remember` records a promotion candidate and appends `memory.candidate.created` to `memory/events.jsonl`.
|
|
219
|
+
`recall` performs deterministic local text search across memory, memory events, worklogs, and evaluations.
|
|
220
|
+
`forget` records a prune/revision entry and appends `memory.pruned`; it does not destructively delete historical evidence.
|
|
221
|
+
`improve` runs the evaluation/review loop and appends `evaluation.created` and `pattern.suggested` events when applicable.
|
|
190
222
|
|
|
191
223
|
### `hook run`
|
|
192
224
|
|
package/docs/evaluation-loop.md
CHANGED
|
@@ -115,6 +115,8 @@ Each evaluation should end with one of these outcomes:
|
|
|
115
115
|
- Propose framework PR.
|
|
116
116
|
- Ask user for confirmation.
|
|
117
117
|
|
|
118
|
+
Daily evaluation is active by default: when it writes an evaluation note, the CLI also records promotion candidates under `memory/long-term.md`. Candidates are intentionally reviewable. Use `awareness memory review` to surface repeated candidates as suggested `pattern` promotions, then promote them with `awareness memory promote` only after they are user-confirmed, repeated, or operationally important.
|
|
119
|
+
|
|
118
120
|
## Example Outcomes
|
|
119
121
|
|
|
120
122
|
| Observation | Improvement |
|
|
@@ -31,13 +31,19 @@ These files are private operational state. Do not commit them.
|
|
|
31
31
|
|
|
32
32
|
| Lifecycle point | Command | Purpose |
|
|
33
33
|
|-----------------|---------|---------|
|
|
34
|
-
| Session start or resume | `awareness hook run --tool TOOL --event session-start` | Ensure private files exist
|
|
34
|
+
| Session start or resume | `awareness hook run --tool TOOL --event session-start` | Ensure private files exist, record that the agent refreshed awareness, and print the Current Focus so the host injects it as context. |
|
|
35
35
|
| Stop or session end | `awareness hook run --tool TOOL --event stop` | Record that the agent reached an idle or handoff boundary. |
|
|
36
36
|
| Pre-compaction | `awareness hook run --tool TOOL --event pre-compact` | Record a compaction boundary before context is summarized. |
|
|
37
|
-
| Post-compaction | `awareness hook run --tool TOOL --event post-compact` | Record that the new compacted context may need `awareness refresh
|
|
37
|
+
| Post-compaction | `awareness hook run --tool TOOL --event post-compact` | Record that the new compacted context may need `awareness refresh`, and re-print the Current Focus so it survives compaction. |
|
|
38
38
|
|
|
39
39
|
Hooks should not append daily worklog entries on every lifecycle event. The worklog is for human-relevant progress with task IDs and evidence.
|
|
40
40
|
|
|
41
|
+
## Context Injection
|
|
42
|
+
|
|
43
|
+
`session-start` and `post-compact` are **context-injection events**: hosts such as Claude Code append the hook's stdout to the agent's context. For these events `awareness hook run` always prints the `Current Focus` block (framed as a load-this-first instruction), so the agent actively loads its focus instead of relying on a passive, possibly stale file import.
|
|
44
|
+
|
|
45
|
+
`--quiet` only suppresses the diagnostic lines (`Hook recorded`, `Runtime log`, `Warnings`). It does **not** suppress the focus payload — the installed hooks pass `--quiet` precisely so the only thing reaching the agent's context is the focus itself. Non-injection events (`stop`, `session-end`, `pre-compact`) never print the focus.
|
|
46
|
+
|
|
41
47
|
## Scheduled Cadence
|
|
42
48
|
|
|
43
49
|
| Cadence | Command | Purpose |
|
package/docs/memory.md
CHANGED
|
@@ -14,6 +14,23 @@ Awareness Framework separates memory by time horizon and trust level. The goal i
|
|
|
14
14
|
|
|
15
15
|
Do not load every layer into every prompt. Load the smallest layer that answers the current need.
|
|
16
16
|
|
|
17
|
+
## Local Operation Model
|
|
18
|
+
|
|
19
|
+
Awareness uses a small local operation vocabulary:
|
|
20
|
+
|
|
21
|
+
- `remember`: capture an evidence-backed candidate.
|
|
22
|
+
- `recall`: search local memory, events, worklogs, and evaluations.
|
|
23
|
+
- `forget`: prune or revise stale memory without destructive deletion.
|
|
24
|
+
- `improve`: run evaluation plus memory review to surface repeated candidates.
|
|
25
|
+
|
|
26
|
+
The append-only event log lives at:
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
~/.agents/memory/events.jsonl
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Markdown files remain the readable projection. The event log is the auditable history of memory operations.
|
|
33
|
+
|
|
17
34
|
## Short-Term Memory
|
|
18
35
|
|
|
19
36
|
Short-term memory is operational. It is optimized for the next action.
|