pulse-framework-cli 0.4.10 → 0.4.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 +1 -1
- package/templates/cursor/pulse.mdc +137 -127
package/package.json
CHANGED
|
@@ -4,177 +4,187 @@ globs: *
|
|
|
4
4
|
alwaysApply: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
# ████████████████████████████████████████████████████
|
|
8
|
+
# █ █
|
|
9
|
+
# █ 🛑 STOP! READ THIS BEFORE DOING ANYTHING! 🛑 █
|
|
10
|
+
# █ █
|
|
11
|
+
# █ 1. Are you in AGENT MODE? █
|
|
12
|
+
# █ → If not, switch to Agent Mode NOW █
|
|
13
|
+
# █ → Plan/Ask modes cannot call tools █
|
|
14
|
+
# █ █
|
|
15
|
+
# █ 2. Call pulse_status IMMEDIATELY █
|
|
16
|
+
# █ → This is your FIRST action, EVERY time █
|
|
17
|
+
# █ → No exceptions. No skipping. █
|
|
18
|
+
# █ █
|
|
19
|
+
# ████████████████████████████████████████████████████
|
|
20
|
+
|
|
21
|
+
## ⚡ FIRST ACTION (before reading user message, before planning)
|
|
12
22
|
|
|
13
23
|
```
|
|
14
24
|
CallMcpTool: pulse_status
|
|
15
25
|
Arguments: { "userMessage": "<paste user's message here>" }
|
|
16
26
|
```
|
|
17
27
|
|
|
18
|
-
|
|
19
|
-
This rule applies to message #1, #2, #3, #50, #100 - ALWAYS.
|
|
20
|
-
|
|
21
|
-
**Pass the user's message** so Pulse can suggest the right tool!
|
|
22
|
-
|
|
23
|
-
**Why?** The MCP tools track your session, prevent loops, and enforce safeguards.
|
|
24
|
-
Without calling `pulse_status`, you're flying blind.
|
|
28
|
+
**Did you call it? If not, STOP and call it NOW.**
|
|
25
29
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
**If pulse_status returns OK:**
|
|
34
|
-
- ✅ Continue with user's request
|
|
30
|
+
This rule applies to:
|
|
31
|
+
- ✅ Message #1
|
|
32
|
+
- ✅ Message #2
|
|
33
|
+
- ✅ Message #3
|
|
34
|
+
- ✅ Message #50
|
|
35
|
+
- ✅ Message #100
|
|
36
|
+
- ✅ EVERY SINGLE MESSAGE
|
|
35
37
|
|
|
36
38
|
---
|
|
37
39
|
|
|
38
|
-
#
|
|
39
|
-
|
|
40
|
-
## 🔴 MANDATORY CHECKS (EVERY response, EVERY message)
|
|
40
|
+
# 🤖 AUTO-EXECUTE RULES (NOT suggestions - DO THEM!)
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
## 1️⃣ EVERY MESSAGE: `pulse_status`
|
|
43
43
|
```
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
WHY: Keeps safeguards active, prevents amnesia between messages
|
|
44
|
+
ALWAYS call pulse_status FIRST with the user's message.
|
|
45
|
+
This tells you what to do next.
|
|
47
46
|
```
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
If you notice you're repeatedly "checking" without progressing (e.g., status → grep → status → grep):
|
|
51
|
-
- STOP after 2 cycles
|
|
52
|
-
- Make a concrete change (minimal scope) OR ask a single clarifying question
|
|
53
|
-
- If you're stuck, use `pulse_correct` ("I'm stuck in verification mode; proceed with the minimal implementation") or `pulse_escalate`
|
|
54
|
-
|
|
55
|
-
### 2. AFTER Code Changes: Call `pulse_doctor`
|
|
48
|
+
## 2️⃣ NEW TASK DETECTED → `pulse_run`
|
|
56
49
|
```
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
IF user says: "new", "implement", "create", "build", "add feature", "start"
|
|
51
|
+
THEN: IMMEDIATELY call pulse_run({ action: "<what user wants>" })
|
|
52
|
+
DO NOT ask for confirmation. Just do it.
|
|
60
53
|
```
|
|
61
54
|
|
|
62
|
-
|
|
55
|
+
## 3️⃣ CODE CHANGED → `pulse_doctor`
|
|
63
56
|
```
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
IF you just edited/created/deleted any file
|
|
58
|
+
THEN: IMMEDIATELY call pulse_doctor()
|
|
59
|
+
DO NOT skip this. Every code change needs a doctor check.
|
|
66
60
|
```
|
|
67
61
|
|
|
68
|
-
##
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
| >10 min since checkpoint | → `pulse_checkpoint` | Just do it, don't ask |
|
|
75
|
-
| >30 min autonomous | → **STOP + ask user** | "I've been working 30 min, should I continue?" |
|
|
76
|
-
| 2-3 failed attempts | → `pulse_escalate` | Build fails twice, test fails twice |
|
|
77
|
-
| Error you don't understand | → `pulse_escalate` | Cryptic error message |
|
|
78
|
-
| User says "that's wrong" | → `pulse_correct` | Course correction |
|
|
79
|
-
| Task completed successfully | → `pulse_learn` | "What did I learn from this?" |
|
|
80
|
-
| Before "done" / PR / merge | → `pulse_review` | Final checklist |
|
|
81
|
-
| New multi-step task | → `pulse_run` | User gives complex task |
|
|
82
|
-
| Loop signal detected | → `pulse_reset` | Doctor shows loop warning |
|
|
83
|
-
| DELETE operation | → **Get user confirmation** | "May I delete X?" |
|
|
84
|
-
|
|
85
|
-
## 🔴 SAFEGUARDS (non-negotiable)
|
|
62
|
+
## 4️⃣ >10 MIN SINCE CHECKPOINT → `pulse_checkpoint`
|
|
63
|
+
```
|
|
64
|
+
IF pulse_status shows >10 min since checkpoint
|
|
65
|
+
THEN: IMMEDIATELY call pulse_checkpoint({ summary: "<what you did>" })
|
|
66
|
+
DO NOT ask. Just checkpoint. Code safety > asking permission.
|
|
67
|
+
```
|
|
86
68
|
|
|
87
|
-
|
|
69
|
+
## 5️⃣ TASK DONE → `pulse_review`
|
|
70
|
+
```
|
|
71
|
+
IF you're about to say "done", "finished", "complete", "ready for PR"
|
|
72
|
+
THEN: FIRST call pulse_review()
|
|
73
|
+
DO NOT claim done without review. Ever.
|
|
74
|
+
```
|
|
88
75
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
76
|
+
## 6️⃣ USER SAYS "WRONG" → `pulse_correct`
|
|
77
|
+
```
|
|
78
|
+
IF user says: "wrong", "no", "stop", "not what I meant", "undo"
|
|
79
|
+
THEN: IMMEDIATELY call pulse_correct({ feedback: "<what's wrong>" })
|
|
80
|
+
DO NOT defend your work. Correct it.
|
|
81
|
+
```
|
|
94
82
|
|
|
95
|
-
##
|
|
83
|
+
## 7️⃣ 2-3 FAILURES → `pulse_escalate`
|
|
84
|
+
```
|
|
85
|
+
IF same error occurs 2-3 times OR you don't understand the error
|
|
86
|
+
THEN: IMMEDIATELY call pulse_escalate({ problem: "...", tried: "..." })
|
|
87
|
+
DO NOT try a 4th time. Escalate.
|
|
88
|
+
```
|
|
96
89
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
90
|
+
## 8️⃣ PROBLEM SOLVED → `pulse_learn`
|
|
91
|
+
```
|
|
92
|
+
IF you just fixed a bug, resolved an escalation, or solved a tricky problem
|
|
93
|
+
THEN: call pulse_learn({ problem: "...", solution: "...", rule: "..." })
|
|
94
|
+
This builds knowledge for future sessions.
|
|
95
|
+
```
|
|
102
96
|
|
|
103
|
-
|
|
97
|
+
## 9️⃣ CRITICAL FINDINGS → STOP
|
|
104
98
|
```
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
4. Inform user
|
|
99
|
+
IF pulse_status or pulse_doctor shows CRITICAL
|
|
100
|
+
THEN: STOP IMMEDIATELY. Do NOT continue with user's request.
|
|
101
|
+
Fix the critical issue first or ask user how to proceed.
|
|
109
102
|
```
|
|
110
103
|
|
|
111
|
-
|
|
104
|
+
---
|
|
112
105
|
|
|
113
|
-
|
|
106
|
+
# 🔴 NON-NEGOTIABLE SAFEGUARDS
|
|
114
107
|
|
|
115
|
-
|
|
116
|
-
2. **Call `pulse_escalate`** with:
|
|
117
|
-
- Problem description
|
|
118
|
-
- What you tried
|
|
119
|
-
- Error message
|
|
120
|
-
3. **WAIT** for user instruction
|
|
108
|
+
These ALWAYS apply, even if user says otherwise:
|
|
121
109
|
|
|
122
|
-
|
|
110
|
+
| Safeguard | Rule |
|
|
111
|
+
|-----------|------|
|
|
112
|
+
| ⏱️ **Time** | MAX 30 min autonomous, then STOP + ask |
|
|
113
|
+
| 🗑️ **Delete** | NEVER delete without explicit "May I delete X?" |
|
|
114
|
+
| 📤 **Push** | NEVER push without explicit "May I push?" |
|
|
115
|
+
| 🔐 **Secrets** | NEVER commit API keys, passwords, tokens |
|
|
116
|
+
| 💾 **Checkpoint** | Every 5-10 min via `pulse_checkpoint` |
|
|
123
117
|
|
|
124
|
-
|
|
118
|
+
---
|
|
125
119
|
|
|
126
|
-
|
|
127
|
-
- What the problem was
|
|
128
|
-
- What solution worked
|
|
129
|
-
- Any rule/pattern to remember
|
|
130
|
-
2. This builds institutional knowledge for future sessions
|
|
120
|
+
# 📊 TOOL DECISION FLOWCHART
|
|
131
121
|
|
|
132
|
-
|
|
122
|
+
```
|
|
123
|
+
START (new message)
|
|
124
|
+
│
|
|
125
|
+
▼
|
|
126
|
+
[pulse_status] ─── Critical? ──► STOP
|
|
127
|
+
│
|
|
128
|
+
│ What did user say?
|
|
129
|
+
│
|
|
130
|
+
├── "new task/implement/build" ──► [pulse_run] ──► implement
|
|
131
|
+
│
|
|
132
|
+
├── "wrong/stop/no" ──► [pulse_correct] ──► fix
|
|
133
|
+
│
|
|
134
|
+
├── "done/finished/PR" ──► [pulse_review] ──► respond
|
|
135
|
+
│
|
|
136
|
+
└── normal request ──► implement
|
|
137
|
+
│
|
|
138
|
+
▼
|
|
139
|
+
[pulse_doctor]
|
|
140
|
+
│
|
|
141
|
+
▼
|
|
142
|
+
>10 min? ──► [pulse_checkpoint]
|
|
143
|
+
│
|
|
144
|
+
▼
|
|
145
|
+
solved problem? ──► [pulse_learn]
|
|
146
|
+
│
|
|
147
|
+
▼
|
|
148
|
+
respond
|
|
149
|
+
```
|
|
133
150
|
|
|
134
|
-
|
|
135
|
-
|------|---------------------|
|
|
136
|
-
| `pulse_status` | **FIRST action** of EVERY message (1st, 2nd, 3rd... ALL) |
|
|
137
|
-
| `pulse_doctor` | **AFTER** any file edit/create/delete |
|
|
138
|
-
| `pulse_checkpoint` | **WHEN** >10 min since last checkpoint |
|
|
139
|
-
| `pulse_run` | **WHEN** user gives multi-step task (>3 steps) |
|
|
140
|
-
| `pulse_escalate` | **WHEN** 2-3 failed attempts OR error you don't understand |
|
|
141
|
-
| `pulse_correct` | **WHEN** user says "wrong", "not what I meant", "stop" |
|
|
142
|
-
| `pulse_review` | **BEFORE** saying "done", creating PR, or merging |
|
|
143
|
-
| `pulse_learn` | **AFTER** solving a non-trivial problem (document what worked) |
|
|
144
|
-
| `pulse_reset` | **WHEN** `pulse_doctor` shows loop signal |
|
|
151
|
+
---
|
|
145
152
|
|
|
146
|
-
|
|
153
|
+
# 🔄 LOOP DETECTION
|
|
147
154
|
|
|
148
|
-
|
|
149
|
-
User: "Add login button"
|
|
155
|
+
If you notice any of these patterns, STOP and call `pulse_escalate`:
|
|
150
156
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
4. Responds with code + recommendation
|
|
157
|
+
- Same error 2-3 times
|
|
158
|
+
- Editing same file repeatedly without progress
|
|
159
|
+
- "Fix" commits followed by more "fix" commits
|
|
160
|
+
- Going back and forth between two approaches
|
|
156
161
|
|
|
157
|
-
|
|
162
|
+
---
|
|
158
163
|
|
|
159
|
-
|
|
160
|
-
1. pulse_status → "⚠️ 14 min since checkpoint"
|
|
161
|
-
2. "Checkpoint recommended. Should I run pulse_checkpoint?"
|
|
162
|
-
3. [After confirmation] pulse_checkpoint
|
|
163
|
-
4. [Runs tests]
|
|
164
|
-
```
|
|
164
|
+
# 📋 QUICK REFERENCE
|
|
165
165
|
|
|
166
|
-
|
|
166
|
+
| Trigger | Tool | Auto-Execute? |
|
|
167
|
+
|---------|------|---------------|
|
|
168
|
+
| Every message | `pulse_status` | ✅ YES |
|
|
169
|
+
| New task | `pulse_run` | ✅ YES |
|
|
170
|
+
| Code changed | `pulse_doctor` | ✅ YES |
|
|
171
|
+
| >10 min | `pulse_checkpoint` | ✅ YES |
|
|
172
|
+
| Before "done" | `pulse_review` | ✅ YES |
|
|
173
|
+
| User says "wrong" | `pulse_correct` | ✅ YES |
|
|
174
|
+
| 2-3 failures | `pulse_escalate` | ✅ YES |
|
|
175
|
+
| Problem solved | `pulse_learn` | ✅ YES |
|
|
167
176
|
|
|
168
|
-
|
|
169
|
-
- When uncertain: STOP and ASK
|
|
170
|
-
- The safeguards ALWAYS apply, even if user argues against them
|
|
171
|
-
- **ALWAYS update CHANGELOG.md** after significant changes (features, fixes, changes)
|
|
177
|
+
**ALL tools are AUTO-EXECUTE. Don't ask. Do.**
|
|
172
178
|
|
|
173
179
|
---
|
|
174
180
|
|
|
175
|
-
|
|
181
|
+
# ⚠️ FINAL REMINDER
|
|
176
182
|
|
|
177
|
-
|
|
178
|
-
|
|
183
|
+
You are an autonomous agent with safeguards. The safeguards are not optional.
|
|
184
|
+
They exist to protect the user's work from:
|
|
185
|
+
- Lost code (checkpoint)
|
|
186
|
+
- Mistakes (doctor)
|
|
187
|
+
- Loops (escalate)
|
|
188
|
+
- Forgotten knowledge (learn)
|
|
179
189
|
|
|
180
|
-
|
|
190
|
+
**Call the tools automatically. Don't wait to be asked.**
|