pulse-framework-cli 0.4.10 → 0.4.11

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.11",
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,166 @@ globs: *
4
4
  alwaysApply: true
5
5
  ---
6
6
 
7
- # ⛔⛔⛔ MANDATORY FOR EVERY MESSAGE ⛔⛔⛔
7
+ # ⛔⛔⛔ MANDATORY: CALL `pulse_status` FIRST ⛔⛔⛔
8
8
 
9
- ## YOU MUST CALL `pulse_status` NOW
10
-
11
- **EVERY message. EVERY time. No exceptions.**
9
+ **BEFORE doing ANYTHING, call:**
12
10
 
13
11
  ```
14
- CallMcpTool: pulse_status
15
- Arguments: { "userMessage": "<paste user's message here>" }
12
+ pulse_status({ userMessage: "<user's message>" })
16
13
  ```
17
14
 
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.
25
-
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
15
+ **Then follow the AUTO-ACTIONS below based on what you detect.**
35
16
 
36
17
  ---
37
18
 
38
- # PULSE Framework Safeguards
39
-
40
- ## 🔴 MANDATORY CHECKS (EVERY response, EVERY message)
19
+ # 🤖 AUTO-EXECUTE RULES (NOT suggestions - DO THEM!)
41
20
 
42
- ### 1. Call `pulse_status` FIRST - EVERY MESSAGE
21
+ ## 1️⃣ EVERY MESSAGE: `pulse_status`
43
22
  ```
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
23
+ ALWAYS call pulse_status FIRST with the user's message.
24
+ This tells you what to do next.
47
25
  ```
48
26
 
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`
27
+ ## 2️⃣ NEW TASK DETECTED → `pulse_run`
56
28
  ```
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!
29
+ IF user says: "new", "implement", "create", "build", "add feature", "start"
30
+ THEN: IMMEDIATELY call pulse_run({ action: "<what user wants>" })
31
+ DO NOT ask for confirmation. Just do it.
60
32
  ```
61
33
 
62
- ### 3. EVERY 5-10 MIN: Recommend `pulse_checkpoint`
34
+ ## 3️⃣ CODE CHANGED `pulse_doctor`
63
35
  ```
64
- WHEN: pulse_status shows >10 min since checkpoint
65
- WHAT: "Should I create a checkpoint?"
36
+ IF you just edited/created/deleted any file
37
+ THEN: IMMEDIATELY call pulse_doctor()
38
+ DO NOT skip this. Every code change needs a doctor check.
66
39
  ```
67
40
 
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)
41
+ ## 4️⃣ >10 MIN SINCE CHECKPOINT → `pulse_checkpoint`
42
+ ```
43
+ IF pulse_status shows >10 min since checkpoint
44
+ THEN: IMMEDIATELY call pulse_checkpoint({ summary: "<what you did>" })
45
+ DO NOT ask. Just checkpoint. Code safety > asking permission.
46
+ ```
86
47
 
87
- These rules are NOT negotiable:
48
+ ## 5️⃣ TASK DONE → `pulse_review`
49
+ ```
50
+ IF you're about to say "done", "finished", "complete", "ready for PR"
51
+ THEN: FIRST call pulse_review()
52
+ DO NOT claim done without review. Ever.
53
+ ```
88
54
 
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`
55
+ ## 6️⃣ USER SAYS "WRONG" `pulse_correct`
56
+ ```
57
+ IF user says: "wrong", "no", "stop", "not what I meant", "undo"
58
+ THEN: IMMEDIATELY call pulse_correct({ feedback: "<what's wrong>" })
59
+ DO NOT defend your work. Correct it.
60
+ ```
94
61
 
95
- ## 🔴 LOOP DETECTION
62
+ ## 7️⃣ 2-3 FAILURES → `pulse_escalate`
63
+ ```
64
+ IF same error occurs 2-3 times OR you don't understand the error
65
+ THEN: IMMEDIATELY call pulse_escalate({ problem: "...", tried: "..." })
66
+ DO NOT try a 4th time. Escalate.
67
+ ```
96
68
 
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)
69
+ ## 8️⃣ PROBLEM SOLVED `pulse_learn`
70
+ ```
71
+ IF you just fixed a bug, resolved an escalation, or solved a tricky problem
72
+ THEN: call pulse_learn({ problem: "...", solution: "...", rule: "..." })
73
+ This builds knowledge for future sessions.
74
+ ```
102
75
 
103
- **On loop signal:**
76
+ ## 9️⃣ CRITICAL FINDINGS → STOP
104
77
  ```
105
- 1. IMMEDIATE STOP
106
- 2. No further changes
107
- 3. Call pulse_escalate
108
- 4. Inform user
78
+ IF pulse_status or pulse_doctor shows CRITICAL
79
+ THEN: STOP IMMEDIATELY. Do NOT continue with user's request.
80
+ Fix the critical issue first or ask user how to proceed.
109
81
  ```
110
82
 
111
- ## On Problems
83
+ ---
112
84
 
113
- After 2-3 failed attempts:
85
+ # 🔴 NON-NEGOTIABLE SAFEGUARDS
114
86
 
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
87
+ These ALWAYS apply, even if user says otherwise:
121
88
 
122
- ## After Success (IMPORTANT!)
89
+ | Safeguard | Rule |
90
+ |-----------|------|
91
+ | ⏱️ **Time** | MAX 30 min autonomous, then STOP + ask |
92
+ | 🗑️ **Delete** | NEVER delete without explicit "May I delete X?" |
93
+ | 📤 **Push** | NEVER push without explicit "May I push?" |
94
+ | 🔐 **Secrets** | NEVER commit API keys, passwords, tokens |
95
+ | 💾 **Checkpoint** | Every 5-10 min via `pulse_checkpoint` |
123
96
 
124
- When you successfully solve a non-trivial problem:
97
+ ---
125
98
 
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
99
+ # 📊 TOOL DECISION FLOWCHART
131
100
 
132
- ## MCP Tools - WHEN TO CALL
101
+ ```
102
+ START (new message)
103
+
104
+
105
+ [pulse_status] ─── Critical? ──► STOP
106
+
107
+ │ What did user say?
108
+
109
+ ├── "new task/implement/build" ──► [pulse_run] ──► implement
110
+
111
+ ├── "wrong/stop/no" ──► [pulse_correct] ──► fix
112
+
113
+ ├── "done/finished/PR" ──► [pulse_review] ──► respond
114
+
115
+ └── normal request ──► implement
116
+
117
+
118
+ [pulse_doctor]
119
+
120
+
121
+ >10 min? ──► [pulse_checkpoint]
122
+
123
+
124
+ solved problem? ──► [pulse_learn]
125
+
126
+
127
+ respond
128
+ ```
133
129
 
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 |
130
+ ---
145
131
 
146
- ## Example Flow
132
+ # 🔄 LOOP DETECTION
147
133
 
148
- ```
149
- User: "Add login button"
134
+ If you notice any of these patterns, STOP and call `pulse_escalate`:
150
135
 
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
136
+ - Same error 2-3 times
137
+ - Editing same file repeatedly without progress
138
+ - "Fix" commits followed by more "fix" commits
139
+ - Going back and forth between two approaches
156
140
 
157
- User: "Test it"
141
+ ---
158
142
 
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
- ```
143
+ # 📋 QUICK REFERENCE
165
144
 
166
- ## IMPORTANT
145
+ | Trigger | Tool | Auto-Execute? |
146
+ |---------|------|---------------|
147
+ | Every message | `pulse_status` | ✅ YES |
148
+ | New task | `pulse_run` | ✅ YES |
149
+ | Code changed | `pulse_doctor` | ✅ YES |
150
+ | >10 min | `pulse_checkpoint` | ✅ YES |
151
+ | Before "done" | `pulse_review` | ✅ YES |
152
+ | User says "wrong" | `pulse_correct` | ✅ YES |
153
+ | 2-3 failures | `pulse_escalate` | ✅ YES |
154
+ | Problem solved | `pulse_learn` | ✅ YES |
167
155
 
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)
156
+ **ALL tools are AUTO-EXECUTE. Don't ask. Do.**
172
157
 
173
158
  ---
174
159
 
175
- ## 🔁 REMINDER: This rule applies to EVERY message
160
+ # ⚠️ FINAL REMINDER
176
161
 
177
- Did you call `pulse_status` at the start of this response?
178
- If not, call it NOW before doing anything else.
162
+ You are an autonomous agent with safeguards. The safeguards are not optional.
163
+ They exist to protect the user's work from:
164
+ - Lost code (checkpoint)
165
+ - Mistakes (doctor)
166
+ - Loops (escalate)
167
+ - Forgotten knowledge (learn)
179
168
 
180
- This is how Pulse stays in your "memory" - by calling it every single time.
169
+ **Call the tools automatically. Don't wait to be asked.**