@voidwire/llm-summarize 3.2.0 → 3.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/index.ts +37 -17
- package/package.json +5 -5
package/index.ts
CHANGED
|
@@ -69,34 +69,54 @@ Output JSON only: {"summary": "One sentence summary"}`;
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
|
-
* Build insights mode prompt
|
|
72
|
+
* Build insights mode prompt for session insight extraction
|
|
73
|
+
* Note: userName param kept for API compatibility but not used in insights mode
|
|
73
74
|
*/
|
|
74
|
-
function buildInsightsPrompt(
|
|
75
|
-
|
|
76
|
-
? `Start the summary with "${userName}".`
|
|
77
|
-
: "";
|
|
75
|
+
function buildInsightsPrompt(_userName?: string): string {
|
|
76
|
+
return `You are a senior engineering manager extracting reusable insights from development sessions.
|
|
78
77
|
|
|
79
|
-
|
|
78
|
+
You receive transcripts with clear role markers:
|
|
79
|
+
- "User Asked:" = the human directing work (requests, approves, provides context)
|
|
80
|
+
- "Assistant Response:" = the AI executing work (implements, builds, debugs, explains)
|
|
80
81
|
|
|
81
|
-
|
|
82
|
+
Your job: extract what's worth remembering for future sessions.
|
|
82
83
|
|
|
83
84
|
<output_schema>
|
|
84
85
|
{
|
|
85
|
-
"summary": "One sentence
|
|
86
|
-
"decisions": ["
|
|
87
|
-
"patterns_used": ["Development pattern or approach
|
|
88
|
-
"preferences_expressed": ["Preference revealed through
|
|
89
|
-
"problems_solved": ["Problem
|
|
90
|
-
"tools_heavy": ["Tool used repeatedly or
|
|
86
|
+
"summary": "One sentence capturing what was accomplished and how",
|
|
87
|
+
"decisions": ["Decision made with reasoning and trade-offs considered"],
|
|
88
|
+
"patterns_used": ["Development pattern or approach, with context on why it was chosen"],
|
|
89
|
+
"preferences_expressed": ["Preference revealed through direction or feedback"],
|
|
90
|
+
"problems_solved": ["Problem encountered and the specific solution applied"],
|
|
91
|
+
"tools_heavy": ["Tool used repeatedly or for critical work"]
|
|
91
92
|
}
|
|
92
93
|
</output_schema>
|
|
93
94
|
|
|
95
|
+
<attribution_rules>
|
|
96
|
+
- User actions: requested, approved, directed, provided, chose, preferred
|
|
97
|
+
- Assistant actions: implemented, built, debugged, refactored, created, fixed
|
|
98
|
+
- Never say "User implemented" or "User built" — users direct, assistants execute
|
|
99
|
+
</attribution_rules>
|
|
100
|
+
|
|
101
|
+
<quality_guidance>
|
|
102
|
+
Extract specifics with context, not bare facts:
|
|
103
|
+
|
|
104
|
+
SPARSE (avoid):
|
|
105
|
+
- "Made a database decision"
|
|
106
|
+
- "Fixed a bug"
|
|
107
|
+
- "Used TypeScript"
|
|
108
|
+
|
|
109
|
+
RICH (prefer):
|
|
110
|
+
- "Chose SQLite over Postgres for single-user CLI tool — avoids server dependency"
|
|
111
|
+
- "Fixed race condition in webhook handler by adding mutex lock — was causing duplicate events"
|
|
112
|
+
- "Used Zod for runtime validation at API boundary — catches malformed input before it hits business logic"
|
|
113
|
+
</quality_guidance>
|
|
114
|
+
|
|
94
115
|
<rules>
|
|
95
|
-
-
|
|
96
|
-
- Include a field ONLY when the conversation provides clear evidence
|
|
97
|
-
- Extract specifics: "Chose SQLite over Postgres for single-user simplicity" not "Made a database decision"
|
|
116
|
+
- Include a field ONLY when the transcript provides clear evidence
|
|
98
117
|
- Omit empty arrays entirely
|
|
99
|
-
-
|
|
118
|
+
- Capture the "why" when present — reasoning is more valuable than the decision alone
|
|
119
|
+
- Technical specifics (library names, patterns, trade-offs) make insights reusable
|
|
100
120
|
</rules>
|
|
101
121
|
|
|
102
122
|
Output valid JSON only. No markdown code blocks, no explanation.`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voidwire/llm-summarize",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Structured session insight extraction for knowledge systems",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.ts",
|
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
"README.md",
|
|
19
19
|
"LICENSE"
|
|
20
20
|
],
|
|
21
|
-
"scripts": {
|
|
22
|
-
"test": "bun test"
|
|
23
|
-
},
|
|
24
21
|
"keywords": [
|
|
25
22
|
"llm",
|
|
26
23
|
"summarize",
|
|
@@ -42,5 +39,8 @@
|
|
|
42
39
|
},
|
|
43
40
|
"engines": {
|
|
44
41
|
"bun": ">=1.0.0"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"test": "bun test"
|
|
45
45
|
}
|
|
46
|
-
}
|
|
46
|
+
}
|