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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pulse-framework-cli",
3
- "version": "0.4.10",
3
+ "version": "0.4.12",
4
4
  "description": "Pulse Framework CLI – Guardrails, checkpoints, and escalation for AI-assisted development.",
5
5
  "author": "Manuel Fuß <kontakt@manuel-fuss.de>",
6
6
  "license": "MIT",
@@ -4,177 +4,187 @@ globs: *
4
4
  alwaysApply: true
5
5
  ---
6
6
 
7
- # ⛔⛔⛔ MANDATORY FOR EVERY MESSAGE ⛔⛔⛔
8
-
9
- ## YOU MUST CALL `pulse_status` NOW
10
-
11
- **EVERY message. EVERY time. No exceptions.**
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
- This is NOT optional. This is NOT just for the first message.
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
- **If pulse_status returns Critical findings:**
29
- - STOP - Do NOT proceed with user's request
30
- - Run `pulse_doctor` to see details
31
- - Wait for user instruction
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
- # PULSE Framework Safeguards
39
-
40
- ## 🔴 MANDATORY CHECKS (EVERY response, EVERY message)
40
+ # 🤖 AUTO-EXECUTE RULES (NOT suggestions - DO THEM!)
41
41
 
42
- ### 1. Call `pulse_status` FIRST - EVERY MESSAGE
42
+ ## 1️⃣ EVERY MESSAGE: `pulse_status`
43
43
  ```
44
- WHEN: FIRST action of EVERY response (message #1, #2, #3... ALL of them)
45
- WHAT: Shows time since checkpoint, changes, risk
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
- ### 1b. Anti-Verification Loop (self-check)
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
- WHEN: When you just changed/created/deleted code
58
- WHAT: Checks for secrets, deletes, scope, loop signals
59
- ON CRITICAL: STOP immediately, don't continue!
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
- ### 3. EVERY 5-10 MIN: Recommend `pulse_checkpoint`
55
+ ## 3️⃣ CODE CHANGED `pulse_doctor`
63
56
  ```
64
- WHEN: pulse_status shows >10 min since checkpoint
65
- WHAT: "Should I create a checkpoint?"
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
- ## 🔴 AUTOMATIC ACTIONS (MANDATORY)
69
-
70
- | Situation | Action | Example |
71
- |-----------|--------|---------|
72
- | **Start of EVERY response** | `pulse_status` | Message 1, 2, 3... ALL |
73
- | Code changed | → `pulse_doctor` | After any edit/create/delete |
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
- These rules are NOT negotiable:
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
- - ⏱️ **MAX 30 min autonomous** - Then STOP + ask user
90
- - 🗑️ **NO DELETE** without explicit user confirmation ("May I delete X?")
91
- - 📤 **NO GIT PUSH** without user confirmation
92
- - 🔐 **NO Secrets** in code (API Keys, Passwords, Tokens)
93
- - 📋 **Git commit every 5-10 min** via `pulse_checkpoint`
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
- ## 🔴 LOOP DETECTION
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
- On EVERY `pulse_doctor` call, these are automatically checked:
98
- - Fix-Chain (multiple "fix" commits)
99
- - Revert-Pattern (A↔B)
100
- - File-Churn (same file 5+ times)
101
- - Pendulum (similar commits)
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
- **On loop signal:**
97
+ ## 9️⃣ CRITICAL FINDINGS → STOP
104
98
  ```
105
- 1. IMMEDIATE STOP
106
- 2. No further changes
107
- 3. Call pulse_escalate
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
- ## On Problems
104
+ ---
112
105
 
113
- After 2-3 failed attempts:
106
+ # 🔴 NON-NEGOTIABLE SAFEGUARDS
114
107
 
115
- 1. **STOP** - No further changes
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
- ## After Success (IMPORTANT!)
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
- When you successfully solve a non-trivial problem:
118
+ ---
125
119
 
126
- 1. **Call `pulse_learn`** to document:
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
- ## MCP Tools - WHEN TO CALL
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
- | Tool | Trigger (MANDATORY) |
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
- ## Example Flow
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
- Agent:
152
- 1. pulse_status → "OK, 8 min since checkpoint"
153
- 2. [Implements code]
154
- 3. pulse_doctor → "OK, no findings"
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
- User: "Test it"
162
+ ---
158
163
 
159
- Agent:
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
- ## IMPORTANT
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
- - Call the tools ACTIVELY, not only when user asks
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
- ## 🔁 REMINDER: This rule applies to EVERY message
181
+ # ⚠️ FINAL REMINDER
176
182
 
177
- Did you call `pulse_status` at the start of this response?
178
- If not, call it NOW before doing anything else.
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
- This is how Pulse stays in your "memory" - by calling it every single time.
190
+ **Call the tools automatically. Don't wait to be asked.**