@awareness-sdk/local 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.
@@ -0,0 +1,393 @@
1
+ {
2
+ "version": 2,
3
+ "markers": {
4
+ "start": "<!-- AWARENESS_RULES_START -->",
5
+ "end": "<!-- AWARENESS_RULES_END -->"
6
+ },
7
+
8
+ "core_lines": [
9
+ "## Awareness Memory Integration (MANDATORY)",
10
+ "",
11
+ "awareness_* = cross-session persistent memory (past decisions, knowledge, tasks).",
12
+ "Other tools = current codebase navigation (file search, code index).",
13
+ "Use BOTH - they serve different purposes.",
14
+ "",
15
+ "STEP 1 - SESSION START:",
16
+ " Call awareness_init(source=\"{source}\") -> get session_id, review context.",
17
+ " If active_skills[] is returned: skill = reusable procedure done 2+ times;",
18
+ " summary = injectable instruction, methods = steps. Apply matching skills to tasks.",
19
+ "",
20
+ "STEP 2 - RECALL BEFORE WORK (progressive disclosure):",
21
+ " 1. awareness_recall(semantic_query=..., keyword_query=..., detail='summary') → lightweight index.",
22
+ " 2. Review summaries/scores, pick relevant IDs.",
23
+ " 3. awareness_recall(detail='full', ids=[...]) → expand only what you need.",
24
+ "",
25
+ "STEP 3 - RECORD EVERY CHANGE:",
26
+ " After EVERY code edit, decision, or bug fix:",
27
+ " awareness_record(content=<detailed natural language description>,",
28
+ " insights={knowledge_cards:[...], action_items:[...], risks:[...]})",
29
+ " Content should be RICH and DETAILED — include reasoning, key code snippets,",
30
+ " user quotes, alternatives considered, and files changed. Do NOT compress into",
31
+ " a single-line summary. The content IS the memory — more detail = better recall.",
32
+ " Include insights to create searchable knowledge in ONE step (recommended).",
33
+ " Skipping = permanent data loss.",
34
+ "",
35
+ "STEP 4 - CATEGORY GUIDE (for insights.knowledge_cards):",
36
+ " - decision = choice made between alternatives.",
37
+ " - problem_solution = bug/problem plus the fix that resolved it.",
38
+ " - workflow = process, setup, or configuration steps only.",
39
+ " - pitfall = blocker, warning, or limitation without a fix yet.",
40
+ " - insight = reusable pattern or general learning.",
41
+ " - skill = reusable procedure done 2+ times; summary = injectable instruction, methods = steps.",
42
+ " - key_point = important technical fact when nothing else fits.",
43
+ " Never default everything to workflow.",
44
+ "",
45
+ "STEP 5 - SESSION END:",
46
+ " awareness_record(content=[step1, step2, ...], insights={...}) with final summary.",
47
+ "",
48
+ "BACKFILL (if applicable):",
49
+ " If MCP connected late: awareness_record(content=<transcript>)",
50
+ "",
51
+ "RULES VERSION: Pass rules_version=\"2\" to awareness_init so the server knows you have these rules.",
52
+ "If the server returns _setup_action, the rules have been updated — follow the instruction to re-sync.",
53
+ "",
54
+ "NOTE: memory_id from X-Awareness-Memory-Id header. source/actor/event_type auto-inferred."
55
+ ],
56
+
57
+ "tools": [
58
+ {
59
+ "name": "awareness_init",
60
+ "short_desc": "Load cross-session project memory and context",
61
+ "long_desc": "Load cross-session project memory. Returns session_id, context (narratives, tasks, knowledge, active_skills), and usage rules. Call ONCE at session start."
62
+ },
63
+ {
64
+ "name": "awareness_get_agent_prompt",
65
+ "short_desc": "Fetch full activation prompt for a specific agent role (sub-agent spawning)",
66
+ "long_desc": "Fetch the full activation prompt for a specific agent role. Call before spawning a sub-agent to get its dedicated system prompt."
67
+ },
68
+ {
69
+ "name": "awareness_recall",
70
+ "short_desc": "Semantic + keyword hybrid recall with progressive disclosure (detail=summary→full)",
71
+ "long_desc": "Recall from persistent memory — semantic + keyword hybrid search with progressive disclosure. Use detail='summary' (default) for a lightweight index of matching items, then detail='full' with ids=[...] to expand only the relevant ones. This two-phase pattern saves tokens and improves accuracy. token_budget is deprecated — use detail+ids instead. Set include_installed=true (default) to also search installed market memories; results are merged by score and tagged with source_type."
72
+ },
73
+ {
74
+ "name": "awareness_lookup",
75
+ "short_desc": "Structured data: tasks, knowledge, risks, timeline",
76
+ "long_desc": "Fast structured data lookup (<50ms). Types: context, tasks, knowledge, risks, session_history, timeline, handoff."
77
+ },
78
+ {
79
+ "name": "awareness_record",
80
+ "short_desc": "Record what you did/decided/learned to persistent memory",
81
+ "long_desc": "Unified write to memory. Pass content (str, list, or dict) + insights={...} to record events and create knowledge cards in ONE call. Content auto-detected: str=single event, list=batch, str+scope=knowledge for docs. Actions: write (default), update_task."
82
+ }
83
+ ],
84
+
85
+ "mcp_instructions": [
86
+ "You have a cognitive memory cloud with Auto-Cognition. Use it automatically — never wait for the user to say \"remember\".",
87
+ "",
88
+ "Do these 3 things every session:",
89
+ "",
90
+ "1. FIRST THING: awareness_init → get session_id + past context. Always do this before any work.",
91
+ "2. BEFORE WORK: awareness_recall → check what you already know. Don't re-solve solved problems.",
92
+ "3. AFTER CHANGES: awareness_record(content=<detailed description>, insights={...}) → save what you did/decided/learned. Be detailed — include reasoning, code snippets, user quotes.",
93
+ "",
94
+ "RECOMMENDED: Pass insights={knowledge_cards:[...], action_items:[...], risks:[...]} with awareness_record to create searchable knowledge in ONE step — no round-trip needed.",
95
+ "Knowledge cards MUST be created. Skipping = the memory is stored but never structured into reusable knowledge.",
96
+ "",
97
+ "SETUP — when awareness_init returns \"_setup_action\" in the response:",
98
+ "You MUST follow the instruction to write rules to the specified file. This enables your persistent memory workflow for all future sessions."
99
+ ],
100
+
101
+ "workflow_reference": {
102
+ "steps": [
103
+ {
104
+ "step": 1,
105
+ "action": "awareness_init",
106
+ "when": "FIRST thing every session",
107
+ "what": "Get session_id + past context (recent summaries, open tasks, knowledge cards, active_skills)",
108
+ "done_check": "You have a session_id. If active_skills[] returned, note them for task matching."
109
+ },
110
+ {
111
+ "step": 2,
112
+ "action": "awareness_recall (two-phase progressive disclosure)",
113
+ "when": "BEFORE starting work on any task",
114
+ "what": "Phase 1: awareness_recall(semantic_query=..., keyword_query=..., detail='summary') → lightweight index. Phase 2: awareness_recall(detail='full', ids=[...relevant IDs...]) → expand only what you need.",
115
+ "example": "awareness_recall(semantic_query=\"How was auth implemented?\", keyword_query=\"auth JWT\", detail=\"summary\") → review → awareness_recall(detail=\"full\", ids=[\"id1\",\"id2\"])",
116
+ "done_check": "You've retrieved summaries, selected relevant items, and expanded the ones you need"
117
+ },
118
+ {
119
+ "step": 3,
120
+ "action": "awareness_record with inline insights",
121
+ "when": "AFTER every code edit, decision, or bug fix",
122
+ "what": "awareness_record(content=<detailed description with reasoning, code snippets, user quotes, files changed>, insights={knowledge_cards:[...], action_items:[...], risks:[...]})",
123
+ "done_check": "Every meaningful change has been recorded WITH rich detail AND structured insights"
124
+ },
125
+ {
126
+ "step": 4,
127
+ "action": "handle _extraction_instruction (legacy fallback)",
128
+ "when": "awareness_record response contains _extraction_instruction (only when insights was omitted)",
129
+ "what": "Follow the instruction to extract insights, then call awareness_record(content=<json>)",
130
+ "warning": "Skipping this = memories stored but NO searchable knowledge cards created"
131
+ }
132
+ ],
133
+ "tips": {
134
+ "recall_vs_lookup": "awareness_recall = search by meaning (semantic), use detail='summary' then detail='full'+ids for progressive disclosure. awareness_lookup = get by type (exact DB, <50ms).",
135
+ "session_end": "Call awareness_record(content=[step1, step2, ...], insights={...}) with a final summary.",
136
+ "setup_action": "If awareness_init returned _setup_action, follow it to write rules to your project.",
137
+ "active_skills": "If awareness_init returned active_skills[], each skill has summary (guidance) + methods (steps). Apply matching skills to tasks — do not re-derive their patterns."
138
+ }
139
+ },
140
+
141
+ "init_guides": {
142
+ "write_guide": "Write DETAILED content in awareness_record — include reasoning, alternatives considered, key code snippets, user quotes, and files changed. Do NOT compress into a single-line summary; the content IS the memory. RECOMMENDED: pass insights={knowledge_cards:[{category,title,summary,status,tags,confidence}], action_items:[{title,priority,status}], risks:[{title,level,detail}]} to create searchable knowledge in ONE step. Categories: decision|problem_solution|workflow|key_point|pitfall|insight|skill|personal_preference|important_detail|plan_intention.",
143
+ "search_guide": "Use progressive disclosure for best recall results: 1) Call awareness_recall(semantic_query=<full question>, keyword_query=<2-5 precise terms>, detail='summary') to get a lightweight index with scores. 2) Review summaries and relevance scores to decide which items matter. 3) Call awareness_recall(detail='full', ids=[<relevant IDs>]) to fetch complete content for only what you need. This saves tokens and improves accuracy. token_budget is deprecated — use the detail+ids two-phase pattern instead.",
144
+ "sub_agent_guide": "AGENT ROUTING: When a task matches an agent_role in agent_profiles, call awareness_get_agent_prompt(agent_role='<role>') to fetch its full activation prompt, then spawn a sub-agent using that prompt as system prompt. Pass agent_role='<role>' to ALL awareness_* calls within the sub-agent. Do NOT pre-fetch all agent prompts — only fetch when actually spawning.",
145
+ "skill_guide": "SKILLS ACTIVE: active_skills[] contains reusable skill prompts extracted from your memory. When a task matches a skill's domain, apply its 'summary' as behavioral guidance and follow 'methods' steps. Skills are pre-loaded at session start for token efficiency — do not re-derive their patterns."
146
+ },
147
+
148
+ "ide_order": [
149
+ "cursor",
150
+ "claude-code",
151
+ "windsurf",
152
+ "cline",
153
+ "copilot",
154
+ "codex",
155
+ "kiro",
156
+ "trae",
157
+ "zed",
158
+ "jetbrains",
159
+ "augment",
160
+ "antigravity",
161
+ "openclaw"
162
+ ],
163
+ "ides": {
164
+ "claude-code": {
165
+ "label": "Claude Code",
166
+ "rules_file": "CLAUDE.md",
167
+ "mcp_path": ".mcp.json",
168
+ "mcp_config_variant": "sse",
169
+ "strategy": "managed_block",
170
+ "conflict_policy": "error_on_invalid_markers",
171
+ "header": "# Project Memory (Awareness MCP)",
172
+ "preamble_lines": [
173
+ "> IMPORTANT: These instructions override default behavior. You must follow them exactly."
174
+ ],
175
+ "notes_lines": [
176
+ "## Compliance Check",
177
+ "Before responding to ANY user request:",
178
+ "1. Have you called awareness_init yet this session? If not, call it NOW.",
179
+ "2. Did you just edit a file? Call awareness_record(content=<detailed description>, insights={...}) IMMEDIATELY.",
180
+ "3. Is the user asking about past work? Call awareness_recall FIRST."
181
+ ]
182
+ },
183
+ "cursor": {
184
+ "label": "Cursor",
185
+ "rules_file": ".cursor/rules/awareness.mdc",
186
+ "mcp_path": ".cursor/mcp.json",
187
+ "strategy": "managed_file",
188
+ "conflict_policy": "error_on_unmanaged_file_unless_force",
189
+ "header": "# Awareness Memory Rules",
190
+ "frontmatter": {
191
+ "description": "Awareness cross-session memory integration rules",
192
+ "globs": "",
193
+ "alwaysApply": true
194
+ },
195
+ "notes_lines": [
196
+ "## Cursor-Specific Notes",
197
+ "- Call awareness_init at the start of EVERY new composer/chat session.",
198
+ "- When using Cursor's edit/apply features, record each apply as a awareness_record.",
199
+ "- The MCP server is configured in .cursor/mcp.json - memory_id is in the headers."
200
+ ]
201
+ },
202
+ "windsurf": {
203
+ "label": "Windsurf",
204
+ "rules_file": ".windsurfrules",
205
+ "mcp_path": null,
206
+ "mcp_global_path": "~/.codeium/windsurf/mcp_config.json",
207
+ "mcp_config_variant": "streamable-http",
208
+ "strategy": "managed_block",
209
+ "conflict_policy": "error_on_invalid_markers",
210
+ "header": "# Awareness Memory Rules",
211
+ "preamble_lines": [
212
+ "These rules are MANDATORY for every interaction in this project."
213
+ ],
214
+ "notes_lines": [
215
+ "## Windsurf-Specific Notes",
216
+ "- Call awareness_init at the start of every new Cascade flow.",
217
+ "- Record each step of multi-file edits with awareness_record."
218
+ ]
219
+ },
220
+ "cline": {
221
+ "label": "Cline",
222
+ "rules_file": ".clinerules",
223
+ "mcp_path": null,
224
+ "mcp_config_variant": "sse",
225
+ "mcp_type_field": "transportType",
226
+ "strategy": "managed_block",
227
+ "conflict_policy": "error_on_invalid_markers",
228
+ "header": "# Awareness Memory Rules",
229
+ "preamble_lines": [
230
+ "MANDATORY rules - follow for the entire session."
231
+ ],
232
+ "notes_lines": [
233
+ "## Cline-Specific Notes",
234
+ "- Call awareness_init when Cline starts a new task.",
235
+ "- After each tool use (file edit, terminal command), call awareness_record."
236
+ ]
237
+ },
238
+ "copilot": {
239
+ "label": "VS Code Copilot",
240
+ "rules_file": ".github/copilot-instructions.md",
241
+ "mcp_path": ".vscode/mcp.json",
242
+ "mcp_servers_key": "servers",
243
+ "mcp_config_variant": "http",
244
+ "strategy": "managed_block",
245
+ "conflict_policy": "error_on_invalid_markers",
246
+ "header": "# Awareness Memory Rules",
247
+ "preamble_lines": [
248
+ "MANDATORY repository instructions for VS Code GitHub Copilot."
249
+ ],
250
+ "notes_lines": [
251
+ "## VS Code Copilot Notes",
252
+ "- Call awareness_init at the start of each new Copilot Chat or agent task.",
253
+ "- After each file edit, terminal command, decision, or fix, call awareness_record.",
254
+ "- The MCP server config should live in .vscode/mcp.json."
255
+ ]
256
+ },
257
+ "codex": {
258
+ "label": "Codex",
259
+ "rules_file": "AGENTS.md",
260
+ "mcp_path": null,
261
+ "mcp_path_toml": ".codex/config.toml",
262
+ "strategy": "managed_block",
263
+ "conflict_policy": "error_on_invalid_markers",
264
+ "header": "# Awareness Memory Integration",
265
+ "preamble_lines": [
266
+ "MANDATORY agent policy - follow for every task."
267
+ ],
268
+ "notes_lines": [
269
+ "## Codex-Specific Notes",
270
+ "- Call awareness_init at task start before reading any files.",
271
+ "- After each code patch, call awareness_record with the change description."
272
+ ]
273
+ },
274
+ "kiro": {
275
+ "label": "Kiro",
276
+ "rules_file": ".kiro/steering/awareness.md",
277
+ "mcp_path": ".kiro/settings/mcp.json",
278
+ "strategy": "managed_file",
279
+ "conflict_policy": "error_on_unmanaged_file_unless_force",
280
+ "header": "# Awareness Memory Rules",
281
+ "preamble_lines": [
282
+ "Steering document — MANDATORY for every Kiro session."
283
+ ],
284
+ "notes_lines": [
285
+ "## Kiro-Specific Notes",
286
+ "- Call awareness_init at the start of every new Kiro task or spec.",
287
+ "- After each code edit or spec change, call awareness_record.",
288
+ "- The MCP server is configured in .kiro/settings/mcp.json."
289
+ ]
290
+ },
291
+ "trae": {
292
+ "label": "Trae",
293
+ "rules_file": ".trae/rules/awareness.md",
294
+ "mcp_path": ".trae/mcp.json",
295
+ "mcp_config_variant": "sse",
296
+ "mcp_array_format": true,
297
+ "strategy": "managed_file",
298
+ "conflict_policy": "error_on_unmanaged_file_unless_force",
299
+ "header": "# Awareness Memory Rules",
300
+ "preamble_lines": [
301
+ "MANDATORY rules for every Trae session in this project."
302
+ ],
303
+ "notes_lines": [
304
+ "## Trae-Specific Notes",
305
+ "- Call awareness_init at the start of every new chat or Builder session.",
306
+ "- After each file edit or terminal command, call awareness_record.",
307
+ "- The MCP server is configured in .trae/mcp.json at the project root."
308
+ ]
309
+ },
310
+ "zed": {
311
+ "label": "Zed",
312
+ "rules_file": ".rules",
313
+ "mcp_path": null,
314
+ "strategy": "managed_block",
315
+ "conflict_policy": "error_on_invalid_markers",
316
+ "header": "# Awareness Memory Rules",
317
+ "preamble_lines": [
318
+ "MANDATORY rules for every Zed Assistant session."
319
+ ],
320
+ "notes_lines": [
321
+ "## Zed-Specific Notes",
322
+ "- Call awareness_init at the start of every new Assistant thread.",
323
+ "- After each inline edit or slash command, call awareness_record.",
324
+ "- MCP server is configured in ~/.config/zed/settings.json under context_servers."
325
+ ]
326
+ },
327
+ "jetbrains": {
328
+ "label": "JetBrains (Junie)",
329
+ "rules_file": ".junie/guidelines.md",
330
+ "mcp_path": ".junie/mcp/mcp.json",
331
+ "strategy": "managed_block",
332
+ "conflict_policy": "error_on_invalid_markers",
333
+ "header": "# Awareness Memory Rules",
334
+ "preamble_lines": [
335
+ "MANDATORY guidelines — follow for every Junie task."
336
+ ],
337
+ "notes_lines": [
338
+ "## JetBrains / Junie Notes",
339
+ "- Call awareness_init at the start of every new Junie task.",
340
+ "- After each code change, call awareness_record with the change description.",
341
+ "- The MCP server is configured in .junie/mcp/mcp.json."
342
+ ]
343
+ },
344
+ "augment": {
345
+ "label": "Augment",
346
+ "rules_file": ".augment/rules/awareness.md",
347
+ "mcp_path": null,
348
+ "mcp_config_variant": "sse",
349
+ "strategy": "managed_block",
350
+ "conflict_policy": "error_on_invalid_markers",
351
+ "header": "# Awareness Memory Rules",
352
+ "preamble_lines": [
353
+ "MANDATORY guidelines for every Augment session."
354
+ ],
355
+ "notes_lines": [
356
+ "## Augment-Specific Notes",
357
+ "- Call awareness_init at the start of every new Augment task.",
358
+ "- After each code edit or suggestion, call awareness_record.",
359
+ "- MCP server is configured via Augment Settings Panel or JSON import."
360
+ ]
361
+ },
362
+ "antigravity": {
363
+ "label": "Google AntiGravity (Jules)",
364
+ "rules_file": ".antigravity/rules.md",
365
+ "mcp_path": null,
366
+ "mcp_global_path": "~/.gemini/antigravity/mcp_config.json",
367
+ "strategy": "managed_block",
368
+ "conflict_policy": "error_on_invalid_markers",
369
+ "header": "# Awareness Memory Rules",
370
+ "preamble_lines": [
371
+ "MANDATORY guidelines for every Jules task."
372
+ ],
373
+ "notes_lines": [
374
+ "## AntiGravity / Jules Notes",
375
+ "- Call awareness_init at the start of every new task or plan.",
376
+ "- After each code change or plan step, call awareness_record.",
377
+ "- MCP server is configured in ~/.gemini/antigravity/mcp_config.json or via the MCP Servers menu."
378
+ ]
379
+ },
380
+ "openclaw": {
381
+ "label": "OpenClaw",
382
+ "rules_file": null,
383
+ "mcp_path": null,
384
+ "strategy": "plugin_config",
385
+ "notes_lines": [
386
+ "## OpenClaw Notes",
387
+ "- OpenClaw uses a plugin-based configuration via ~/.openclaw/openclaw.json.",
388
+ "- Install the Awareness plugin: openclaw plugins install @awareness-sdk/openclaw-memory",
389
+ "- MCP tools are exposed through the plugin system, no rules file needed."
390
+ ]
391
+ }
392
+ }
393
+ }