osborn 0.9.27 → 0.9.29

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,108 @@
1
+ ---
2
+ name: user-context
3
+ description: Learn and maintain a living context document about this specific user — their vocabulary, communication style, recurring topics, and decision patterns. Adapted from grill-with-docs for voice-native conversations rather than code. Use when the user wants to update their context, or run passively after meaningful sessions to capture what was learned.
4
+ ---
5
+
6
+ <what-to-do>
7
+
8
+ Interview the user to build and sharpen a shared vocabulary between them and the agent.
9
+ Ask one question at a time and wait for a response before continuing.
10
+
11
+ The goal is NOT a coding spec. The goal is understanding HOW THIS PERSON communicates,
12
+ what words they use naturally, what they mean when they say things, and what matters to them.
13
+
14
+ Update `~/.claude/skills/user-context/CONTEXT.md` inline as terms and preferences are resolved.
15
+ Do not batch — capture as they happen.
16
+
17
+ </what-to-do>
18
+
19
+ <trigger-phrases>
20
+ - "grill me"
21
+ - "learn my language"
22
+ - "update my context"
23
+ - "learn how I talk"
24
+ - "standardise my language"
25
+ - "update user context"
26
+ </trigger-phrases>
27
+
28
+ <supporting-info>
29
+
30
+ ## What to capture
31
+
32
+ ### Vocabulary
33
+ When the user uses a term consistently, record it. When they use multiple words
34
+ for the same thing, help them pick one. Example: if they say "the cloud machine",
35
+ "the fly machine", and "the server" interchangeably — resolve it.
36
+
37
+ ### Communication style
38
+ How formal or casual are they? How much technical depth do they expect?
39
+ Do they prefer short answers or thorough ones? Do they interrupt and redirect often?
40
+
41
+ ### Recurring topics
42
+ What subjects come up repeatedly? What projects, people, or concepts
43
+ are central to their world?
44
+
45
+ ### Decision patterns
46
+ How do they make decisions? Do they want options presented or a direct recommendation?
47
+ Do they want to understand the why, or just the what?
48
+
49
+ ## During the session
50
+
51
+ ### Challenge fuzzy language
52
+ When the user uses vague or inconsistent terms, name it: "You've said both
53
+ 'voice session' and 'room' — are those the same thing to you, or different?"
54
+
55
+ ### Reflect back
56
+ Periodically summarise what you've learned: "So when you say 'the agent',
57
+ you mean the cloud process on the fly machine, not me (Claude) — is that right?"
58
+
59
+ ### Update CONTEXT.md inline
60
+ When a term or preference is clarified, write it to
61
+ `~/.claude/skills/user-context/CONTEXT.md` immediately using the format below.
62
+
63
+ ## CONTEXT.md format
64
+
65
+ ```md
66
+ # User Context — {user name or handle}
67
+
68
+ {One or two sentences about who this person is and what they're building.}
69
+
70
+ ## Language
71
+
72
+ **Voice session**: An active connection between the user's browser and the fly machine via LiveKit.
73
+ _Avoid_: "room" (unless referring specifically to the LiveKit room name)
74
+
75
+ **The agent**: The osborn Node.js process running on the fly machine (not Claude).
76
+ _Avoid_: "Claude", "AI", "bot" — those refer to the LLM, not the agent process.
77
+
78
+ **The dashboard**: voice-native.com — the web app frontend.
79
+ _Avoid_: "the front end", "the UI" (too generic)
80
+
81
+ ## Communication style
82
+
83
+ - Prefers direct recommendations over options when the answer is clear
84
+ - Talks fast and interrupts — short answers are better unless depth is asked for
85
+ - Uses voice transcription — expects the agent to handle garbled/incomplete input gracefully
86
+ - Casual tone, first-name basis, profanity is fine
87
+
88
+ ## Recurring topics
89
+
90
+ - Osborn: voice AI coding assistant built on LiveKit + Claude Agent SDK
91
+ - Fly machines: the cloud sandbox infrastructure replacing Sprites
92
+ - Sessions: Claude Code JSONL files stored in ~/.claude/projects/
93
+
94
+ ## Decision patterns
95
+
96
+ - Values speed over perfection for first implementations
97
+ - Prefers understanding the root cause before applying a fix
98
+ - Wants to be told when something is irreversible before proceeding
99
+ ```
100
+
101
+ ## Rules
102
+
103
+ - Keep definitions tight — one or two sentences.
104
+ - Only record terms specific to this user's world. Generic concepts don't belong.
105
+ - Update the file live during the session, not at the end.
106
+ - Re-read the existing CONTEXT.md at the start of every session that touches it.
107
+
108
+ </supporting-info>
@@ -1095,6 +1095,35 @@ class ClaudeLLMStream extends llm.LLMStream {
1095
1095
  catch (blErr) {
1096
1096
  console.error('⚠️ PostCompact: BEHAVIORAL_LEARNINGS write failed:', blErr instanceof Error ? blErr.message : blErr);
1097
1097
  }
1098
+ // ── Section 5: USER_CONTEXT — merge into user-context/CONTEXT.md ──
1099
+ // Passive UX: agent learns the user's language automatically after every
1100
+ // compaction. No explicit "grill me" command needed. The compact summary
1101
+ // captures vocabulary/style observations confirmed during the session.
1102
+ try {
1103
+ const userCtx = extractSection('=== USER_CONTEXT ===');
1104
+ const hasContent = userCtx.length >= 30 && !userCtx.includes('(none this session)');
1105
+ if (hasContent) {
1106
+ progress('Updating user context', `${userCtx.length} chars`);
1107
+ const ctxFolder = join(skillDir, '.claude', 'skills', 'user-context');
1108
+ const ctxPath = join(ctxFolder, 'CONTEXT.md');
1109
+ mkdirSync(ctxFolder, { recursive: true });
1110
+ // Append new observations to existing CONTEXT.md under a dated section.
1111
+ // The grill-me skill can consolidate/clean up on explicit request.
1112
+ const existing = existsSyncFs(ctxPath) ? readSyncFs(ctxPath, 'utf-8') : '# User Context\n\n';
1113
+ const entry = `\n## Observations — ${today} (session ${sessionId.substring(0, 8)})\n\n${userCtx}\n`;
1114
+ writeSyncFs(ctxPath, existing + entry, 'utf-8');
1115
+ console.log(`🧠 PostCompact: updated user context at ${ctxPath}`);
1116
+ skillsWritten++;
1117
+ skillNames.push('user-context');
1118
+ progress('Wrote skill', 'user-context');
1119
+ }
1120
+ else {
1121
+ console.log('🧠 PostCompact: no USER_CONTEXT observations this session — skipping');
1122
+ }
1123
+ }
1124
+ catch (ucErr) {
1125
+ console.error('⚠️ PostCompact: USER_CONTEXT write failed:', ucErr instanceof Error ? ucErr.message : ucErr);
1126
+ }
1098
1127
  this.#opts.onCompactionEvent?.({ type: 'compaction_complete', skillsWritten, skillNames });
1099
1128
  console.log(`🧠 PostCompact: complete — ${skillsWritten} skill file(s) written: [${skillNames.join(', ')}]`);
1100
1129
  }
@@ -56,4 +56,26 @@ If the EXISTING LEARNED SKILLS section is shown below, merge — update outdated
56
56
 
57
57
  ---
58
58
 
59
- IMPORTANT: All four sections MUST appear at the end of the compact summary even if some are empty. Empty sections should have a single line: (none this session)
59
+ ---
60
+
61
+ ## Section 5: USER_CONTEXT
62
+ Format: === USER_CONTEXT ===
63
+ Capture what you learned about THIS USER's language and communication style this session.
64
+ Only include observations that were CONFIRMED — things the user actually said, corrected, or repeated.
65
+ Skip if nothing new was observed.
66
+
67
+ VOCABULARY:
68
+ - List any terms the user used consistently with a specific meaning
69
+ - List any terms they used interchangeably that should be standardised
70
+ - Format: **term**: what they mean by it. _Avoid_: alternatives they used
71
+
72
+ STYLE:
73
+ - One or two sentences describing how they communicate (tone, pace, depth preference)
74
+ - Only include if a clear pattern emerged this session
75
+
76
+ RECURRING:
77
+ - Topics, projects, or concepts that came up repeatedly
78
+
79
+ ---
80
+
81
+ IMPORTANT: All five sections MUST appear at the end of the compact summary even if some are empty. Empty sections should have a single line: (none this session)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "osborn",
3
- "version": "0.9.27",
3
+ "version": "0.9.29",
4
4
  "description": "Voice AI coding assistant - local agent that connects to Osborn frontend",
5
5
  "type": "module",
6
6
  "bin": {