@fyso/awareness-framework 0.1.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/LICENSE +176 -0
- package/README.md +112 -0
- package/bin/awareness.js +9 -0
- package/docs/adoption.md +99 -0
- package/docs/cli.md +300 -0
- package/docs/evaluation-loop.md +128 -0
- package/docs/framework.md +95 -0
- package/docs/governance.md +48 -0
- package/docs/hooks-and-scheduling.md +160 -0
- package/docs/install.md +250 -0
- package/docs/lifecycle.md +125 -0
- package/docs/memory.md +173 -0
- package/docs/multi-user-scoping.md +146 -0
- package/docs/personality.md +144 -0
- package/docs/private-state.md +157 -0
- package/package.json +45 -0
- package/src/cli.js +1330 -0
- package/templates/agent-instructions.md +37 -0
- package/templates/awareness-current.md +53 -0
- package/templates/cli-wrapper.md +11 -0
- package/templates/daily-worklog.md +11 -0
- package/templates/end-of-day-summary.md +27 -0
- package/templates/evaluation-note.md +42 -0
- package/templates/framework-improvement-proposal.md +24 -0
- package/templates/memory-long-term.md +37 -0
- package/templates/personality.md +38 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Evaluation Loop
|
|
2
|
+
|
|
3
|
+
The framework should improve from use, but it should not mutate itself silently.
|
|
4
|
+
|
|
5
|
+
Self-improvement means:
|
|
6
|
+
|
|
7
|
+
1. observe friction
|
|
8
|
+
2. score the process
|
|
9
|
+
3. propose the smallest useful change
|
|
10
|
+
4. review the change
|
|
11
|
+
5. update the framework only after approval
|
|
12
|
+
|
|
13
|
+
This loop evaluates both execution quality and memory quality. A good evaluation decides whether the next action is a local habit change, a short-term awareness cleanup, a long-term memory update, a template adjustment, or a framework PR.
|
|
14
|
+
|
|
15
|
+
## Boundary
|
|
16
|
+
|
|
17
|
+
| Can happen automatically | Requires human review |
|
|
18
|
+
|--------------------------|-----------------------|
|
|
19
|
+
| Generate a private daily evaluation note | Change the versioned framework |
|
|
20
|
+
| Detect stale awareness state | Post to Jira or another external system |
|
|
21
|
+
| Suggest a better template | Merge methodology changes |
|
|
22
|
+
| Flag noisy or missing fields | Store new durable personal memory |
|
|
23
|
+
| Prepare an improvement proposal | Apply organization-wide rules |
|
|
24
|
+
| Record hook and scheduler runtime events | Treat runtime events as work evidence |
|
|
25
|
+
|
|
26
|
+
## Cadence
|
|
27
|
+
|
|
28
|
+
| Cadence | Question |
|
|
29
|
+
|---------|----------|
|
|
30
|
+
| Session hook | Did the agent reach a lifecycle boundary that should be recorded? |
|
|
31
|
+
| Hourly schedule | Is private state healthy enough for parallel work to continue? |
|
|
32
|
+
| Task switch | Was the previous task left with a clear state and next action? |
|
|
33
|
+
| Handoff | Can another agent continue from private files alone? |
|
|
34
|
+
| Daily schedule | Should a private evaluation note be created for review? |
|
|
35
|
+
| End of day | Can the day be summarized by task ID with evidence? |
|
|
36
|
+
| Weekly | Did recurring failures justify a framework change? |
|
|
37
|
+
|
|
38
|
+
## Self-Evaluation Dimensions
|
|
39
|
+
|
|
40
|
+
Evaluate the agent as a collaborator, not only the files.
|
|
41
|
+
|
|
42
|
+
| Dimension | Question |
|
|
43
|
+
|-----------|----------|
|
|
44
|
+
| Task execution | Did the agent make correct, useful progress toward the user's goal? |
|
|
45
|
+
| Awareness hygiene | Is `current.md` compact, fresh, and useful for the next agent? |
|
|
46
|
+
| Worklog quality | Can the day be reconstructed with task IDs and evidence? |
|
|
47
|
+
| Memory quality | Did anything deserve promotion to long-term memory or pruning from it? |
|
|
48
|
+
| Personality fit | Did the agent preserve continuity, voice, context sensitivity, and honest repair? |
|
|
49
|
+
| Tool reliability | Did CLI commands and checks reduce context burden or add friction? |
|
|
50
|
+
| Framework feedback | Did repeated friction suggest a versioned methodology change? |
|
|
51
|
+
|
|
52
|
+
## Signals
|
|
53
|
+
|
|
54
|
+
Track signals from private awareness and worklog files:
|
|
55
|
+
|
|
56
|
+
- stale `Current Focus`
|
|
57
|
+
- active tasks without `Next`
|
|
58
|
+
- worklog entries without task IDs
|
|
59
|
+
- worklog entries without evidence
|
|
60
|
+
- repeated blockers without owner or checkpoint
|
|
61
|
+
- external task IDs discovered late
|
|
62
|
+
- chat-only decisions not reflected in the worklog
|
|
63
|
+
- awareness board too verbose to scan
|
|
64
|
+
- end-of-day summary requiring manual reconstruction
|
|
65
|
+
|
|
66
|
+
## Scoring Rubric
|
|
67
|
+
|
|
68
|
+
Use a small 0-2 rubric.
|
|
69
|
+
|
|
70
|
+
| Dimension | 0 | 1 | 2 |
|
|
71
|
+
|-----------|---|---|---|
|
|
72
|
+
| Freshness | Awareness is stale or misleading | Mostly current with minor gaps | Current focus and task states are accurate |
|
|
73
|
+
| Traceability | Work cannot be tied to IDs or evidence | Some work is traceable | Meaningful work has task ID and evidence |
|
|
74
|
+
| Handoff quality | Chat history is required | Next actions exist but lack context | Another agent can continue from files alone |
|
|
75
|
+
| Noise control | Files are too verbose or obsolete | Some cleanup needed | Current board is compact and useful |
|
|
76
|
+
| Reporting readiness | Summary needs reconstruction | Summary exists with manual fixes | Summary is ready for human review |
|
|
77
|
+
|
|
78
|
+
Scores are diagnostic. A low score should produce a targeted improvement proposal, not blame.
|
|
79
|
+
|
|
80
|
+
## Improvement Rules
|
|
81
|
+
|
|
82
|
+
- Add a rule only when a repeated failure cannot be solved by a local habit.
|
|
83
|
+
- Add a field only when it improves handoff or end-of-day reporting.
|
|
84
|
+
- Remove fields that agents fill with low-value boilerplate.
|
|
85
|
+
- Convert repeated user corrections into template improvements.
|
|
86
|
+
- Keep the awareness board optimized for next action.
|
|
87
|
+
- Keep the worklog optimized for evidence.
|
|
88
|
+
- Promote short-term observations to long-term memory only when user-confirmed, repeated, or operationally important.
|
|
89
|
+
- Prune memory that becomes stale, noisy, sensitive, or contradicted by direct user instructions.
|
|
90
|
+
- Change the framework through reviewed commits or pull requests.
|
|
91
|
+
|
|
92
|
+
## Improvement Routing
|
|
93
|
+
|
|
94
|
+
| Finding | Route |
|
|
95
|
+
|---------|-------|
|
|
96
|
+
| Current focus stale | Update `awareness/current.md` |
|
|
97
|
+
| Missing evidence | Append or correct the daily worklog |
|
|
98
|
+
| Repeated preference | Promote to `memory/preferences.md` or `memory/long-term.md` |
|
|
99
|
+
| Collaboration style correction | Update `memory/personality.md` |
|
|
100
|
+
| Repeated workflow friction | Propose a template or docs PR |
|
|
101
|
+
| Sensitive or stale memory | Prune private memory |
|
|
102
|
+
| Tool command confusion | Improve CLI docs or command behavior |
|
|
103
|
+
| Repeated scheduler warning | Improve local habits, templates, or CLI checks |
|
|
104
|
+
|
|
105
|
+
## Evaluation Output
|
|
106
|
+
|
|
107
|
+
Each evaluation should end with one of these outcomes:
|
|
108
|
+
|
|
109
|
+
- No change.
|
|
110
|
+
- Clean up awareness.
|
|
111
|
+
- Append missing evidence.
|
|
112
|
+
- Promote memory.
|
|
113
|
+
- Prune memory.
|
|
114
|
+
- Adjust local habit.
|
|
115
|
+
- Propose framework PR.
|
|
116
|
+
- Ask user for confirmation.
|
|
117
|
+
|
|
118
|
+
## Example Outcomes
|
|
119
|
+
|
|
120
|
+
| Observation | Improvement |
|
|
121
|
+
|-------------|-------------|
|
|
122
|
+
| Many entries say `Unassigned` but later map to Jira | Add an end-of-day reconciliation prompt |
|
|
123
|
+
| Blockers remain stale for days | Add `Since` and `Needed to unblock` to blocked tasks |
|
|
124
|
+
| Awareness board grows too large | Add an end-of-day cleanup step |
|
|
125
|
+
| Test evidence is often missing | Make `Evidence` required in worklog entries |
|
|
126
|
+
| Agents over-log trivial actions | Clarify which events deserve entries |
|
|
127
|
+
| User repeats the same preference | Promote it to long-term memory |
|
|
128
|
+
| Personality feels generic | Add or revise private personality traits |
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Framework
|
|
2
|
+
|
|
3
|
+
Awareness Framework separates methodology from operational state.
|
|
4
|
+
|
|
5
|
+
The framework lives in version control. Real state lives privately on the operator's machine or in an approved private system.
|
|
6
|
+
|
|
7
|
+
## Design Goals
|
|
8
|
+
|
|
9
|
+
1. Make agent work reconstructable at the end of the day.
|
|
10
|
+
2. Support multiple parallel tasks without relying on chat history.
|
|
11
|
+
3. Make handoffs between agent sessions explicit.
|
|
12
|
+
4. Preserve evidence for external worklogs and status reports.
|
|
13
|
+
5. Improve the methodology through reviewable changes.
|
|
14
|
+
|
|
15
|
+
## Non-Goals
|
|
16
|
+
|
|
17
|
+
1. Do not replace Jira, GitHub Issues, sprint boards, or project task managers.
|
|
18
|
+
2. Do not store secrets, credentials, customer data, or private memories.
|
|
19
|
+
3. Do not require a specific AI agent, CLI, model, or vendor.
|
|
20
|
+
4. Do not make autonomous external updates without human confirmation.
|
|
21
|
+
5. Do not optimize for exhaustive history in the live awareness board.
|
|
22
|
+
|
|
23
|
+
## Operating Principles
|
|
24
|
+
|
|
25
|
+
### 1. Current State Is Mutable
|
|
26
|
+
|
|
27
|
+
The awareness board is a compact snapshot of the current operating state. It can be edited as work changes.
|
|
28
|
+
|
|
29
|
+
It should answer:
|
|
30
|
+
|
|
31
|
+
- What is the current focus?
|
|
32
|
+
- What tasks are active, paused, blocked, or waiting?
|
|
33
|
+
- What is the next action for each active task?
|
|
34
|
+
- What evidence exists?
|
|
35
|
+
- What should appear in the end-of-day report?
|
|
36
|
+
|
|
37
|
+
### 2. Bootstrap Is Not Synchronization
|
|
38
|
+
|
|
39
|
+
Instruction-file imports can preload the awareness board at session start. That is a snapshot, not a live subscription to file changes.
|
|
40
|
+
|
|
41
|
+
In parallel-agent workflows, agents should refresh from disk before acting on potentially stale state. If the CLI is available, use `awareness refresh`, `awareness check`, or `awareness handoff`. If not, reread `~/.agents/awareness/current.md`.
|
|
42
|
+
|
|
43
|
+
### 3. History Is Append-Only
|
|
44
|
+
|
|
45
|
+
The daily worklog is chronological and append-only. Corrections are new entries.
|
|
46
|
+
|
|
47
|
+
It should capture:
|
|
48
|
+
|
|
49
|
+
- task starts and switches
|
|
50
|
+
- concrete progress
|
|
51
|
+
- meaningful decisions
|
|
52
|
+
- blockers
|
|
53
|
+
- verification
|
|
54
|
+
- commits, PRs, deployments, and external evidence
|
|
55
|
+
|
|
56
|
+
### 4. Evidence Beats Narration
|
|
57
|
+
|
|
58
|
+
Prefer concrete evidence over long prose:
|
|
59
|
+
|
|
60
|
+
- file paths
|
|
61
|
+
- commands
|
|
62
|
+
- test results
|
|
63
|
+
- commit hashes
|
|
64
|
+
- PR links
|
|
65
|
+
- issue IDs
|
|
66
|
+
- blocker owners
|
|
67
|
+
|
|
68
|
+
### 5. External IDs Are Preserved, Not Invented
|
|
69
|
+
|
|
70
|
+
When a Jira issue, GitHub issue, PR, or ticket exists, record it. If none exists, use `Unassigned` and reconcile later.
|
|
71
|
+
|
|
72
|
+
Agents must not invent external IDs.
|
|
73
|
+
|
|
74
|
+
### 6. Private State Is Not Versioned
|
|
75
|
+
|
|
76
|
+
This repository stores templates and rules only. Real files such as `~/.agents/awareness/current.md` and `~/.agents/worklog/YYYY-MM-DD.md` stay private.
|
|
77
|
+
|
|
78
|
+
### 7. Self-Improvement Is Reviewed
|
|
79
|
+
|
|
80
|
+
Agents can detect process friction and suggest improvements, but framework changes happen through pull requests or another reviewed change process.
|
|
81
|
+
|
|
82
|
+
## Parallel Task Model
|
|
83
|
+
|
|
84
|
+
Only one task is the current focus, but many tasks can be active, paused, blocked, or waiting.
|
|
85
|
+
|
|
86
|
+
| Section | Role |
|
|
87
|
+
|---------|------|
|
|
88
|
+
| Current Focus | The one task the current session is actively serving |
|
|
89
|
+
| Active Tasks | Work that can continue |
|
|
90
|
+
| Blocked Tasks | Work that cannot continue and why |
|
|
91
|
+
| Waiting On User | Decisions, credentials, approvals, or clarifications |
|
|
92
|
+
| Parking Lot | Relevant deferred ideas |
|
|
93
|
+
| End-of-Day Candidates | Work likely to become an external summary or worklog |
|
|
94
|
+
|
|
95
|
+
The most important field for parallel work is `Next`. If `Next` is unclear, the task is not ready for handoff.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Governance
|
|
2
|
+
|
|
3
|
+
The framework is versioned so changes can be reviewed and improved without mixing in private operational data.
|
|
4
|
+
|
|
5
|
+
## Change Types
|
|
6
|
+
|
|
7
|
+
| Change | Review expectation |
|
|
8
|
+
|--------|--------------------|
|
|
9
|
+
| Clarify wording | Normal review |
|
|
10
|
+
| Add template field | Explain the handoff or reporting benefit |
|
|
11
|
+
| Remove template field | Explain the noise reduction |
|
|
12
|
+
| Add lifecycle rule | Provide repeated-friction evidence |
|
|
13
|
+
| Change privacy guardrail | Require explicit review |
|
|
14
|
+
| Add tool-specific guidance | Keep it optional and vendor-neutral |
|
|
15
|
+
|
|
16
|
+
## Review Checklist
|
|
17
|
+
|
|
18
|
+
Before merging a framework change, check:
|
|
19
|
+
|
|
20
|
+
- Does it improve handoff, traceability, or reporting?
|
|
21
|
+
- Does it avoid storing private state?
|
|
22
|
+
- Does it stay tool-agnostic?
|
|
23
|
+
- Does it avoid adding fields that agents will fill with boilerplate?
|
|
24
|
+
- Does it preserve human confirmation for external writes?
|
|
25
|
+
- Is the example sanitized?
|
|
26
|
+
|
|
27
|
+
## Privacy Rules
|
|
28
|
+
|
|
29
|
+
Do not commit:
|
|
30
|
+
|
|
31
|
+
- real awareness boards
|
|
32
|
+
- real worklogs
|
|
33
|
+
- personal memories
|
|
34
|
+
- customer details
|
|
35
|
+
- secrets or credentials
|
|
36
|
+
- raw chat transcripts
|
|
37
|
+
|
|
38
|
+
## Improvement Proposal Standard
|
|
39
|
+
|
|
40
|
+
Framework changes should answer:
|
|
41
|
+
|
|
42
|
+
- What repeated problem was observed?
|
|
43
|
+
- What private evidence supports it, in sanitized form?
|
|
44
|
+
- What is the smallest change?
|
|
45
|
+
- How will we know whether it helped?
|
|
46
|
+
- When should the change be reverted or simplified?
|
|
47
|
+
|
|
48
|
+
Use [the improvement proposal template](../templates/framework-improvement-proposal.md).
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Hooks and Scheduling
|
|
2
|
+
|
|
3
|
+
Hooks and schedules make the framework easier for agents to follow without loading the full methodology into every prompt.
|
|
4
|
+
|
|
5
|
+
The rule is intentionally conservative:
|
|
6
|
+
|
|
7
|
+
- Tool hooks do small lifecycle maintenance.
|
|
8
|
+
- Global schedules do periodic health checks and daily evaluation.
|
|
9
|
+
- Long-term memory promotion stays curated and evidence-backed.
|
|
10
|
+
- External posting to Jira, GitHub, email, or chat never happens from these hooks by default.
|
|
11
|
+
|
|
12
|
+
## Storage Paths
|
|
13
|
+
|
|
14
|
+
Private awareness state remains under:
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
~/.agents/
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Hook and scheduler runtime events are low-noise technical records:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
~/.agents/runtime/hooks/YYYY-MM-DD.jsonl
|
|
24
|
+
~/.agents/runtime/schedule/YYYY-MM-DD.jsonl
|
|
25
|
+
~/.agents/runtime/launchd/
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
These files are private operational state. Do not commit them.
|
|
29
|
+
|
|
30
|
+
## Hook Cadence
|
|
31
|
+
|
|
32
|
+
| Lifecycle point | Command | Purpose |
|
|
33
|
+
|-----------------|---------|---------|
|
|
34
|
+
| Session start or resume | `awareness hook run --tool TOOL --event session-start` | Ensure private files exist and record that the agent refreshed awareness. |
|
|
35
|
+
| Stop or session end | `awareness hook run --tool TOOL --event stop` | Record that the agent reached an idle or handoff boundary. |
|
|
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`. |
|
|
38
|
+
|
|
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
|
+
|
|
41
|
+
## Scheduled Cadence
|
|
42
|
+
|
|
43
|
+
| Cadence | Command | Purpose |
|
|
44
|
+
|---------|---------|---------|
|
|
45
|
+
| Hourly | `awareness schedule run --cadence hourly` | Verify private state and record warnings. |
|
|
46
|
+
| Daily | `awareness schedule run --cadence daily` | Verify private state and create the daily evaluation note if it does not already exist. |
|
|
47
|
+
|
|
48
|
+
Daily evaluation writes:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
~/.agents/evaluations/YYYY-MM-DD.md
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
It does not automatically edit long-term memory or the versioned framework.
|
|
55
|
+
|
|
56
|
+
## Install Hooks
|
|
57
|
+
|
|
58
|
+
Install hook integrations for supported CLIs:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
awareness hook install --tool all --command "$(command -v awareness)"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Install one integration at a time:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
awareness hook install --tool codex --command "$(command -v awareness)"
|
|
68
|
+
awareness hook install --tool claude --command "$(command -v awareness)"
|
|
69
|
+
awareness hook install --tool opencode --command "$(command -v awareness)"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Generated files:
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
~/.codex/hooks.json
|
|
76
|
+
~/.claude/settings.json
|
|
77
|
+
~/.config/opencode/plugins/awareness-framework.js
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The installer merges Codex and Claude JSON files. For OpenCode, it writes a generated plugin file and does not overwrite a custom file unless `--overwrite` is passed.
|
|
81
|
+
|
|
82
|
+
## Install Global Schedules On macOS
|
|
83
|
+
|
|
84
|
+
Write user LaunchAgents:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
awareness schedule install --cadence all --command "$(command -v awareness)"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Write and load them immediately:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
awareness schedule install --cadence all --command "$(command -v awareness)" --load
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Generated files:
|
|
97
|
+
|
|
98
|
+
```text
|
|
99
|
+
~/Library/LaunchAgents/dev.fyso.awareness.hourly.plist
|
|
100
|
+
~/Library/LaunchAgents/dev.fyso.awareness.daily.plist
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Use an absolute command path for LaunchAgents. `launchd` does not run through an interactive shell and may not have the same `PATH`.
|
|
104
|
+
|
|
105
|
+
Install a channel-scoped schedule when a multi-channel integration needs independent maintenance:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
awareness schedule install --cadence all --channel support --command "$(command -v awareness)"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
This writes labels such as:
|
|
112
|
+
|
|
113
|
+
```text
|
|
114
|
+
dev.fyso.awareness.support.hourly
|
|
115
|
+
dev.fyso.awareness.support.daily
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Tool Notes
|
|
119
|
+
|
|
120
|
+
### Codex
|
|
121
|
+
|
|
122
|
+
Codex discovers hooks from `~/.codex/hooks.json`, `~/.codex/config.toml`, project `.codex/` files, and enabled plugins. Codex requires non-managed command hooks to be reviewed and trusted with `/hooks` before they run.
|
|
123
|
+
|
|
124
|
+
Reference: [Codex hooks](https://developers.openai.com/codex/hooks).
|
|
125
|
+
|
|
126
|
+
### Claude Code
|
|
127
|
+
|
|
128
|
+
Claude Code hooks are configured in JSON settings files such as `~/.claude/settings.json`. It supports session, turn, tool, compaction, and session-end events. Command hooks receive JSON event input on stdin.
|
|
129
|
+
|
|
130
|
+
Reference: [Claude Code hooks reference](https://code.claude.com/docs/en/hooks).
|
|
131
|
+
|
|
132
|
+
### OpenCode
|
|
133
|
+
|
|
134
|
+
OpenCode loads global plugins from:
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
~/.config/opencode/plugins/
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
The generated plugin subscribes to session events and the compaction hook, then invokes the Awareness CLI.
|
|
141
|
+
|
|
142
|
+
Reference: [OpenCode plugins](https://opencode.ai/docs/plugins/).
|
|
143
|
+
|
|
144
|
+
### Pi
|
|
145
|
+
|
|
146
|
+
Pi currently uses the regular wrapper file generated by `awareness init --wrappers`. Add a Pi hook installer only after confirming a stable lifecycle hook mechanism for the specific Pi CLI/runtime in use.
|
|
147
|
+
|
|
148
|
+
## Memory Interaction
|
|
149
|
+
|
|
150
|
+
Hooks and schedules may create observations, warnings, and evaluation notes. They must not silently promote memories.
|
|
151
|
+
|
|
152
|
+
Promotion still follows the memory pipeline:
|
|
153
|
+
|
|
154
|
+
1. Observe in runtime, worklog, evaluation, or personality candidate.
|
|
155
|
+
2. Attach evidence.
|
|
156
|
+
3. Classify the observation.
|
|
157
|
+
4. Promote only when repeated, user-confirmed, or operationally important.
|
|
158
|
+
5. Prune stale or sensitive memory.
|
|
159
|
+
|
|
160
|
+
This keeps the system useful without turning automation into an unreviewed preference engine.
|
package/docs/install.md
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# Install
|
|
2
|
+
|
|
3
|
+
This page installs the optional Awareness Framework CLI and initializes private local state.
|
|
4
|
+
|
|
5
|
+
The framework can still be used manually from templates. The CLI is recommended when agents should maintain awareness and worklogs through commands instead of keeping the full methodology in context.
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
- Node.js 20 or newer
|
|
10
|
+
- A shell where global npm binaries are on `PATH`
|
|
11
|
+
- npm registry access to `@fyso/awareness-framework`
|
|
12
|
+
|
|
13
|
+
Check Node:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
node --version
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Install The CLI
|
|
20
|
+
|
|
21
|
+
Install from npm:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g @fyso/awareness-framework
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Verify:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
awareness help
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If global npm cache permissions are broken on the machine, use a temporary cache:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm_config_cache=/tmp/npm-cache-awareness npm install -g @fyso/awareness-framework
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Initialize Private State
|
|
40
|
+
|
|
41
|
+
Initialize the private awareness home:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
awareness init
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
This creates missing files under `~/.agents/`:
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
~/.agents/
|
|
51
|
+
AGENTS.md
|
|
52
|
+
awareness/current.md
|
|
53
|
+
worklog/YYYY-MM-DD.md
|
|
54
|
+
memory/personality.md
|
|
55
|
+
memory/preferences.md
|
|
56
|
+
memory/patterns.md
|
|
57
|
+
memory/long-term.md
|
|
58
|
+
memory/users/
|
|
59
|
+
evaluations/
|
|
60
|
+
runtime/
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Existing files are not overwritten.
|
|
64
|
+
|
|
65
|
+
Initialize a channel-scoped state folder:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
awareness init --channel support
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
This creates missing files under:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
~/.agents/channels/support/
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Record narrow user memory inside the selected channel:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
awareness user note \
|
|
81
|
+
--channel support \
|
|
82
|
+
--user user-123 \
|
|
83
|
+
--kind topic \
|
|
84
|
+
--text "Has been discussing worklog automation" \
|
|
85
|
+
--evidence "Message link or timestamp"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Initialize Agent Wrappers
|
|
89
|
+
|
|
90
|
+
Create regular wrapper files for supported CLIs:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
awareness init --wrappers
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
This creates missing files:
|
|
97
|
+
|
|
98
|
+
```text
|
|
99
|
+
~/.codex/AGENTS.md
|
|
100
|
+
~/.claude/CLAUDE.md
|
|
101
|
+
~/.config/opencode/AGENTS.md
|
|
102
|
+
~/.pi/agent/AGENTS.md
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Wrappers point to the canonical private protocol:
|
|
106
|
+
|
|
107
|
+
```text
|
|
108
|
+
~/.agents/AGENTS.md
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Existing wrappers are not overwritten. To intentionally replace wrappers:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
awareness init --wrappers --overwrite-wrappers
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Verify Initialization
|
|
118
|
+
|
|
119
|
+
Check current state:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
awareness status
|
|
123
|
+
awareness check
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
If another agent may have changed state during a session:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
awareness refresh
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Before handoff:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
awareness handoff
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Optional Hook Installation
|
|
139
|
+
|
|
140
|
+
Wrappers tell agents what to read. Hooks make supported tools run the maintenance commands at lifecycle boundaries.
|
|
141
|
+
|
|
142
|
+
Install hooks for Codex, Claude Code, and OpenCode:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
awareness hook install --tool all --command "$(command -v awareness)"
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Generated files:
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
~/.codex/hooks.json
|
|
152
|
+
~/.claude/settings.json
|
|
153
|
+
~/.config/opencode/plugins/awareness-framework.js
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Codex requires configured command hooks to be reviewed and trusted from `/hooks` before they run.
|
|
157
|
+
|
|
158
|
+
## Optional Global Schedule
|
|
159
|
+
|
|
160
|
+
On macOS, install hourly and daily user LaunchAgents:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
awareness schedule install --cadence all --command "$(command -v awareness)"
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Load them immediately:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
awareness schedule install --cadence all --command "$(command -v awareness)" --load
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Generated files:
|
|
173
|
+
|
|
174
|
+
```text
|
|
175
|
+
~/Library/LaunchAgents/dev.fyso.awareness.hourly.plist
|
|
176
|
+
~/Library/LaunchAgents/dev.fyso.awareness.daily.plist
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Hourly runs record private health events. Daily runs create the evaluation note if missing.
|
|
180
|
+
|
|
181
|
+
## Custom Paths
|
|
182
|
+
|
|
183
|
+
Use a custom private awareness home:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
awareness init --home /path/to/.agents
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Use custom wrapper roots for tests or non-standard machines:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
awareness init --wrappers \
|
|
193
|
+
--home /path/to/.agents \
|
|
194
|
+
--user-home /path/to/user-home \
|
|
195
|
+
--config-home /path/to/config-home
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Environment variables are also supported:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
AGENTS_HOME=/path/to/.agents awareness status
|
|
202
|
+
AWARENESS_USER_HOME=/path/to/user-home awareness init --wrappers
|
|
203
|
+
XDG_CONFIG_HOME=/path/to/config-home awareness init --wrappers
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Update
|
|
207
|
+
|
|
208
|
+
Reinstall from npm:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
npm install -g @fyso/awareness-framework
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Then refresh local private files and wrappers:
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
awareness init --wrappers
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Use `--overwrite-wrappers` only when you want the framework to replace existing wrapper files.
|
|
221
|
+
|
|
222
|
+
Refresh hooks and schedules after upgrading when command paths or hook definitions changed:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
awareness hook install --tool all --command "$(command -v awareness)"
|
|
226
|
+
awareness schedule install --cadence all --command "$(command -v awareness)"
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## Uninstall
|
|
230
|
+
|
|
231
|
+
Remove the global CLI:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
npm uninstall -g @fyso/awareness-framework
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
This does not delete private state under `~/.agents/`, wrapper files, hooks, or LaunchAgents.
|
|
238
|
+
|
|
239
|
+
## Development Install
|
|
240
|
+
|
|
241
|
+
For framework development:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
git clone https://github.com/fyso-dev/awareness-framework.git
|
|
245
|
+
cd awareness-framework
|
|
246
|
+
npm test
|
|
247
|
+
npm link
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
After `npm link`, the `awareness` command points to the local checkout.
|