sticky-note-cli 2.6.11 → 2.6.12
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/package.json
CHANGED
package/templates/CLAUDE.md
CHANGED
|
@@ -189,9 +189,15 @@ if set up by `npx sticky-note init`.
|
|
|
189
189
|
### ⚠️ Overlap warnings (CRITICAL — always surface these)
|
|
190
190
|
|
|
191
191
|
Sticky-note hooks detect when your files overlap with other teammates'
|
|
192
|
-
open or stuck threads.
|
|
193
|
-
|
|
194
|
-
|
|
192
|
+
open or stuck threads. Overlap warnings arrive through TWO channels:
|
|
193
|
+
|
|
194
|
+
1. **Injected context** — `[STICKY-NOTE] ⚠️ OVERLAP DETECTED` appears in
|
|
195
|
+
your hook output. This fires on every user prompt.
|
|
196
|
+
2. **Tool call deny** — Your first tool call may be denied with a reason
|
|
197
|
+
containing "CRITICAL INSTRUCTION" and the overlap details.
|
|
198
|
+
|
|
199
|
+
When you receive an overlap warning through EITHER channel, you **MUST**
|
|
200
|
+
start your response with this exact banner format before doing ANYTHING else:
|
|
195
201
|
|
|
196
202
|
```
|
|
197
203
|
⚠️ Overlap detected: [user] is working on [files] — [narrative summary]
|
|
@@ -202,6 +208,7 @@ Rules:
|
|
|
202
208
|
- This banner MUST be the **very first thing** in your response
|
|
203
209
|
- Do NOT bury it at the end or in a footnote
|
|
204
210
|
- Do NOT rephrase it as "Also noted..." or "By the way..."
|
|
211
|
+
- If a tool call was denied with overlap info, display the warning then proceed
|
|
205
212
|
- Then continue with the user's actual request normally
|
|
206
213
|
|
|
207
214
|
This pattern exists to prevent two teammates from wasting hours on the
|
|
@@ -167,9 +167,16 @@ if set up by `npx sticky-note init`.
|
|
|
167
167
|
### ⚠️ Overlap warnings (CRITICAL — always surface these)
|
|
168
168
|
|
|
169
169
|
Sticky-note hooks detect when your files overlap with other teammates'
|
|
170
|
-
open or stuck threads.
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
open or stuck threads. Overlap warnings arrive through TWO channels:
|
|
171
|
+
|
|
172
|
+
1. **Injected context** — `[STICKY-NOTE] ⚠️ OVERLAP DETECTED` appears in
|
|
173
|
+
your `additionalContext`. This fires on every user prompt.
|
|
174
|
+
2. **Tool call deny** — Your first tool call may be denied with a
|
|
175
|
+
`permissionDecisionReason` containing "CRITICAL INSTRUCTION" and the
|
|
176
|
+
overlap details. After the deny, the tool is auto-retried.
|
|
177
|
+
|
|
178
|
+
When you receive an overlap warning through EITHER channel, you **MUST**
|
|
179
|
+
start your response with this exact banner format before doing ANYTHING else:
|
|
173
180
|
|
|
174
181
|
```
|
|
175
182
|
⚠️ Overlap detected: [user] is working on [files] — [narrative summary]
|
|
@@ -187,6 +194,7 @@ Rules:
|
|
|
187
194
|
- Show it BEFORE your thinking indicators (◐, ●, etc.)
|
|
188
195
|
- Do NOT bury it at the end or in a footnote
|
|
189
196
|
- Do NOT rephrase it as "Also noted..." or "By the way..."
|
|
197
|
+
- If a tool call was denied with overlap info, display the warning then proceed
|
|
190
198
|
- Then continue with the user's actual request normally
|
|
191
199
|
|
|
192
200
|
This pattern exists to prevent two teammates from wasting hours on the
|
|
@@ -150,8 +150,9 @@ function detectAndFormatOverlaps(threads, currentUser) {
|
|
|
150
150
|
});
|
|
151
151
|
|
|
152
152
|
const lines = [
|
|
153
|
-
"## [STICKY-NOTE] ⚠️ OVERLAP DETECTED
|
|
154
|
-
"**
|
|
153
|
+
"## [STICKY-NOTE] ⚠️ OVERLAP DETECTED\n",
|
|
154
|
+
"**CRITICAL INSTRUCTION: Display the overlap warning below as the FIRST line of your response.",
|
|
155
|
+
"Do NOT skip this. Do NOT rephrase it. Do NOT bury it.**\n",
|
|
155
156
|
"Someone else is working on files you're touching:\n",
|
|
156
157
|
];
|
|
157
158
|
for (const { thread, overlap } of warnings) {
|
|
@@ -195,14 +195,19 @@ function _checkOverlapsAndDeny() {
|
|
|
195
195
|
|
|
196
196
|
if (warnings.length === 0) return null;
|
|
197
197
|
|
|
198
|
-
const lines = [
|
|
198
|
+
const lines = [
|
|
199
|
+
"CRITICAL INSTRUCTION: Before doing anything else, display the following overlap warning to the user.",
|
|
200
|
+
"This is NOT optional. Show it as the FIRST line of your response.\n",
|
|
201
|
+
];
|
|
199
202
|
for (const { thread, overlap } of warnings) {
|
|
200
203
|
const user = thread.user || thread.author || "unknown";
|
|
201
204
|
const status = thread.status === "stuck" ? "STUCK" : "OPEN";
|
|
202
205
|
const snip = (thread.narrative || thread.last_note || "").substring(0, 80);
|
|
203
|
-
|
|
206
|
+
const threadId = (thread.id || "").substring(0, 8);
|
|
207
|
+
lines.push(`⚠️ Overlap detected: ${user} is working on ${overlap.join(", ")}${snip ? " — " + snip : ""}`);
|
|
208
|
+
lines.push(` Status: ${status} | Resume: npx sticky-note resume ${threadId}`);
|
|
204
209
|
}
|
|
205
|
-
lines.push("
|
|
210
|
+
lines.push("\nAfter displaying the warning, continue with the user's request. This tool call will be auto-retried.");
|
|
206
211
|
|
|
207
212
|
markOverlapWarned();
|
|
208
213
|
|