continuous-improvement 2.2.0 → 3.0.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/CHANGELOG.md +17 -0
- package/README.md +183 -26
- package/bin/analyze.sh +27 -41
- package/bin/install.mjs +193 -27
- package/bin/mcp-server.mjs +543 -0
- package/hooks/session.sh +106 -0
- package/package.json +17 -8
- package/plugins/beginner.json +42 -0
- package/plugins/expert.json +62 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,23 @@ All notable changes to this skill are documented here.
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [2.3.0] — 2026-04-06
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- **Public npm** — package name changed from `@naimkatiman/continuous-improvement` to `continuous-improvement`. Removed GitHub Packages publishConfig. `npx continuous-improvement install` now works for everyone.
|
|
11
|
+
- **Expanded keywords** — added `claude-code-skill`, `agent-skill`, `gemini-cli` for better npm discoverability
|
|
12
|
+
- **Improved description** — package description now leads with the value prop, lists supported platforms
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- **Test suite** — 20 tests covering installer, hook, and SKILL.md validation. Zero dependencies (Node.js built-in test runner).
|
|
16
|
+
- **Before/after examples in README** — collapsible terminal output showing the framework in action vs. without it
|
|
17
|
+
- **Real-world examples** — `examples/` directory with 3 detailed scenarios (bug fix, feature build, refactor)
|
|
18
|
+
- **Platform badges** — Claude Code, Cursor, Codex compatibility badges in README
|
|
19
|
+
- **Gemini CLI** to supported platforms list
|
|
20
|
+
- **Roadmap** — "Roadmap to 1000 Stars" section in README with phased plan
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
7
24
|
## [2.1.0] — 2026-04-05
|
|
8
25
|
|
|
9
26
|
### Changed
|
package/README.md
CHANGED
|
@@ -1,38 +1,130 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="assets/combined.gif" alt="Before vs After
|
|
2
|
+
<img src="assets/combined.gif" alt="Before vs After — The 7 Laws of AI Agent Discipline" width="700" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<h1 align="center">The 7 Laws of AI Agent Discipline</h1>
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<b>Stop your AI agent from skipping steps, guessing, and declaring "done" without verifying.</b>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/continuous-improvement"><img src="https://img.shields.io/npm/v/continuous-improvement" alt="npm"></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/continuous-improvement"><img src="https://img.shields.io/npm/dm/continuous-improvement" alt="downloads"></a>
|
|
14
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="license"></a>
|
|
15
|
+
<a href="test/"><img src="https://img.shields.io/badge/tests-20%20passing-brightgreen" alt="tests"></a>
|
|
16
|
+
</p>
|
|
8
17
|
|
|
9
|
-
|
|
10
|
-
|
|
18
|
+
<p align="center">
|
|
19
|
+
<a href="https://docs.anthropic.com/en/docs/claude-code"><img src="https://img.shields.io/badge/Claude%20Code-skill-blueviolet" alt="Claude Code"></a>
|
|
20
|
+
<a href="https://cursor.sh"><img src="https://img.shields.io/badge/Cursor-compatible-blue" alt="Cursor"></a>
|
|
21
|
+
<a href="https://openai.com/codex"><img src="https://img.shields.io/badge/Codex-compatible-blue" alt="Codex"></a>
|
|
22
|
+
<a href="https://ai.google.dev/gemini-api/docs/gemini-cli"><img src="https://img.shields.io/badge/Gemini%20CLI-compatible-blue" alt="Gemini CLI"></a>
|
|
23
|
+
</p>
|
|
11
24
|
|
|
12
25
|
---
|
|
13
26
|
|
|
14
27
|
## The Problem
|
|
15
28
|
|
|
16
|
-
AI agents are great at individual steps. They're terrible at discipline
|
|
29
|
+
AI agents are great at individual steps. They're terrible at **discipline**.
|
|
17
30
|
|
|
18
31
|
They skip research. They plan loosely. They declare "done" before verifying. They add features mid-task. They never reflect. Each session, they repeat the same mistakes.
|
|
19
32
|
|
|
20
|
-
|
|
33
|
+
**The 7 Laws** fix that — plus a **learning system** (Mulahazah) that builds instincts over time. No config, no daemon, no manual setup.
|
|
34
|
+
|
|
35
|
+
### Before vs After
|
|
36
|
+
|
|
37
|
+
<details>
|
|
38
|
+
<summary><b>Without continuous-improvement</b> — agent skips research, declares "done" without verifying</summary>
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
You: Add rate limiting to the /api/users endpoint
|
|
42
|
+
|
|
43
|
+
Agent: I'll add rate limiting now.
|
|
44
|
+
*writes express-rate-limit middleware*
|
|
45
|
+
Done! I've added rate limiting to the /api/users endpoint.
|
|
46
|
+
|
|
47
|
+
You: Did you check if we already have rate limiting somewhere?
|
|
48
|
+
Agent: Let me check... oh, there's already a rate limiter in middleware/rateLimit.ts.
|
|
49
|
+
I've created a duplicate. Let me fix that.
|
|
50
|
+
|
|
51
|
+
You: Did you test it?
|
|
52
|
+
Agent: Let me run the tests... they're failing. The import path is wrong.
|
|
53
|
+
*fixes import*
|
|
54
|
+
Now it works!
|
|
55
|
+
|
|
56
|
+
You: You also broke the /api/auth endpoint — it was sharing that middleware.
|
|
57
|
+
Agent: I see. Let me fix that too...
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Result:** 4 back-and-forth corrections. Duplicate code. Broken endpoint. 15 minutes wasted.
|
|
61
|
+
</details>
|
|
62
|
+
|
|
63
|
+
<details>
|
|
64
|
+
<summary><b>With continuous-improvement</b> — agent follows the 7 laws</summary>
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
You: Add rate limiting to the /api/users endpoint
|
|
68
|
+
|
|
69
|
+
Agent: **[Law 1: Research]** Searching for existing rate limiting...
|
|
70
|
+
Found: middleware/rateLimit.ts — already applies to /api/auth.
|
|
71
|
+
Found: express-rate-limit already in package.json.
|
|
72
|
+
|
|
73
|
+
**[Law 2: Plan]**
|
|
74
|
+
WILL: Extend existing rateLimit middleware to cover /api/users
|
|
75
|
+
WILL NOT: Create new middleware or change existing /api/auth behavior
|
|
76
|
+
VERIFY: Run tests + curl /api/users 101 times to confirm 429 response
|
|
77
|
+
|
|
78
|
+
**[Law 3: Execute one thing]** Adding /api/users to the route list
|
|
79
|
+
in middleware/rateLimit.ts...
|
|
80
|
+
|
|
81
|
+
**[Law 4: Verify]**
|
|
82
|
+
✓ npm test — 47/47 passing
|
|
83
|
+
✓ curl test — 429 after 100 requests
|
|
84
|
+
✓ /api/auth still works — 200 OK
|
|
85
|
+
|
|
86
|
+
Done. Extended existing rate limiter to cover /api/users.
|
|
87
|
+
One file changed: middleware/rateLimit.ts (+1 line).
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Result:** Correct on first attempt. No duplicate code. No broken endpoints. 2 minutes.
|
|
91
|
+
</details>
|
|
21
92
|
|
|
22
93
|
---
|
|
23
94
|
|
|
24
95
|
## Install
|
|
25
96
|
|
|
97
|
+
### Beginner (default) — just hooks, no setup needed
|
|
98
|
+
|
|
26
99
|
```bash
|
|
27
100
|
npx continuous-improvement install
|
|
28
101
|
```
|
|
29
102
|
|
|
30
|
-
That's it. For Claude Code, this
|
|
103
|
+
That's it. For Claude Code, this installs:
|
|
31
104
|
- Observation hooks (captures every tool call, <50ms, jq optional)
|
|
32
105
|
- `/continuous-improvement` command
|
|
33
106
|
- Auto-leveling instinct system
|
|
34
107
|
|
|
35
|
-
|
|
108
|
+
### Expert — full power with MCP server
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
npx continuous-improvement install --mode expert
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Everything in beginner plus:
|
|
115
|
+
- **MCP server** with 8 tools (instinct management, import/export, observation viewer)
|
|
116
|
+
- **Session hooks** (auto-load instincts at start, remind to reflect at end)
|
|
117
|
+
- Works with Claude Code, Claude Desktop, and any MCP client
|
|
118
|
+
|
|
119
|
+
### MCP only — for non-Claude editors
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
npx continuous-improvement install --mode mcp
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Registers the MCP server without hooks — for Cursor, Zed, Windsurf, VS Code, or any editor that supports MCP.
|
|
126
|
+
|
|
127
|
+
### Install to a specific target
|
|
36
128
|
|
|
37
129
|
```bash
|
|
38
130
|
npx continuous-improvement install --target claude # Claude Code + Mulahazah
|
|
@@ -57,17 +149,19 @@ Fetch and follow the skill at: https://raw.githubusercontent.com/naimkatiman/con
|
|
|
57
149
|
|
|
58
150
|
---
|
|
59
151
|
|
|
60
|
-
## The 7 Laws
|
|
152
|
+
## The 7 Laws of AI Agent Discipline
|
|
153
|
+
|
|
154
|
+
> Every skill in the ecosystem adds capabilities. This is the only one that fixes *how agents think*.
|
|
61
155
|
|
|
62
|
-
| # | Law |
|
|
63
|
-
|
|
64
|
-
| 1 | **Research Before Executing** |
|
|
65
|
-
| 2 | **Plan Is Sacred** |
|
|
66
|
-
| 3 | **One Thing at a Time** |
|
|
67
|
-
| 4 | **Verify Before Reporting** |
|
|
68
|
-
| 5 | **Reflect After Sessions** |
|
|
69
|
-
| 6 | **Iterate One Change** |
|
|
70
|
-
| 7 | **Learn From Every Session** |
|
|
156
|
+
| # | Law | Without it, agents... |
|
|
157
|
+
|---|-----|----------------------|
|
|
158
|
+
| 1 | **Research Before Executing** | reinvent what already exists |
|
|
159
|
+
| 2 | **Plan Is Sacred** | scope-creep and overbuild |
|
|
160
|
+
| 3 | **One Thing at a Time** | stack untested changes |
|
|
161
|
+
| 4 | **Verify Before Reporting** | lie about being "done" |
|
|
162
|
+
| 5 | **Reflect After Sessions** | repeat the same failures |
|
|
163
|
+
| 6 | **Iterate One Change** | debug 5 changes at once |
|
|
164
|
+
| 7 | **Learn From Every Session** | lose knowledge when the context window ends |
|
|
71
165
|
|
|
72
166
|
### The Loop
|
|
73
167
|
|
|
@@ -75,6 +169,8 @@ Fetch and follow the skill at: https://raw.githubusercontent.com/naimkatiman/con
|
|
|
75
169
|
Research → Plan → Execute (one thing) → Verify → Reflect → Learn → Iterate
|
|
76
170
|
```
|
|
77
171
|
|
|
172
|
+
If your agent is skipping a step, that's the step it needs most.
|
|
173
|
+
|
|
78
174
|
---
|
|
79
175
|
|
|
80
176
|
## Mulahazah: Auto-Leveling Learning
|
|
@@ -107,14 +203,28 @@ Install: Hooks start capturing silently. You notice nothing.
|
|
|
107
203
|
|
|
108
204
|
---
|
|
109
205
|
|
|
206
|
+
## Real-World Examples
|
|
207
|
+
|
|
208
|
+
See the [`examples/`](examples/) directory for detailed walkthroughs:
|
|
209
|
+
|
|
210
|
+
- [**Bug Fix**](examples/01-bug-fix.md) — Double submit bug: 4 rounds without framework → 1 round with it
|
|
211
|
+
- [**Feature Build**](examples/02-feature-build.md) — Adding pagination: 3 rewrites without → correct first attempt with
|
|
212
|
+
- [**Refactor**](examples/03-refactor.md) — SDK migration: cascading failures without → zero regressions with
|
|
213
|
+
|
|
214
|
+
Each example shows the same task done with and without the 7 laws, highlighting which laws made the difference.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
110
218
|
## Files
|
|
111
219
|
|
|
112
220
|
```
|
|
113
221
|
continuous-improvement/
|
|
114
222
|
├── SKILL.md # The 7 Laws + instinct behavior
|
|
115
|
-
├── commands/continuous-improvement.md #
|
|
116
|
-
├── hooks/observe.sh # Observation hook (pure bash)
|
|
223
|
+
├── commands/continuous-improvement.md # /continuous-improvement command
|
|
224
|
+
├── hooks/observe.sh # Observation hook (pure bash, <50ms)
|
|
117
225
|
├── bin/install.mjs # CLI installer
|
|
226
|
+
├── test/ # 20 tests (node --test)
|
|
227
|
+
├── examples/ # Real-world before/after scenarios
|
|
118
228
|
├── QUICKSTART.md # First-use guide
|
|
119
229
|
├── CHANGELOG.md
|
|
120
230
|
└── package.json
|
|
@@ -126,12 +236,12 @@ continuous-improvement/
|
|
|
126
236
|
~/.claude/skills/continuous-improvement/SKILL.md # The skill
|
|
127
237
|
~/.claude/commands/continuous-improvement.md # The command
|
|
128
238
|
~/.claude/instincts/
|
|
129
|
-
├── observe.sh
|
|
130
|
-
├── global/
|
|
239
|
+
├── observe.sh # Hook script
|
|
240
|
+
├── global/ # Global instincts (*.yaml)
|
|
131
241
|
└── <project-hash>/
|
|
132
|
-
├── project.json
|
|
133
|
-
├── observations.jsonl
|
|
134
|
-
└── *.yaml
|
|
242
|
+
├── project.json # Project metadata
|
|
243
|
+
├── observations.jsonl # Tool call observations
|
|
244
|
+
└── *.yaml # Project instincts
|
|
135
245
|
```
|
|
136
246
|
|
|
137
247
|
---
|
|
@@ -142,6 +252,21 @@ continuous-improvement/
|
|
|
142
252
|
npx continuous-improvement install --uninstall
|
|
143
253
|
```
|
|
144
254
|
|
|
255
|
+
Removes the skill, hooks, and command. Your learned instincts in `~/.claude/instincts/` are preserved — delete that directory manually if you want a clean slate.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Works With
|
|
260
|
+
|
|
261
|
+
| Tool | Support |
|
|
262
|
+
|------|---------|
|
|
263
|
+
| **Claude Code** | Full — skill + hooks + auto-leveling instincts |
|
|
264
|
+
| **Cursor** | Skill only (paste SKILL.md into rules) |
|
|
265
|
+
| **Codex** | Skill only |
|
|
266
|
+
| **Gemini CLI** | Skill only |
|
|
267
|
+
| **OpenClaw** | Skill only |
|
|
268
|
+
| **Any LLM** | Paste SKILL.md into your system prompt |
|
|
269
|
+
|
|
145
270
|
---
|
|
146
271
|
|
|
147
272
|
## Red Flags
|
|
@@ -156,6 +281,38 @@ If your agent says any of these, it's skipping a law:
|
|
|
156
281
|
|
|
157
282
|
---
|
|
158
283
|
|
|
284
|
+
## Roadmap
|
|
285
|
+
|
|
286
|
+
### Phase 1: Foundation -- DONE
|
|
287
|
+
|
|
288
|
+
- [x] Published to public npm (`npx continuous-improvement install` works)
|
|
289
|
+
- [x] 20-test suite (installer, hook, SKILL.md validation)
|
|
290
|
+
- [x] Before/after examples in README + `examples/` directory
|
|
291
|
+
- [x] Gemini CLI support
|
|
292
|
+
- [x] Platform badges and improved npm metadata
|
|
293
|
+
- [ ] **Submit to [awesome-agent-skills](https://github.com/VoltAgent/awesome-agent-skills)** (14K stars)
|
|
294
|
+
|
|
295
|
+
### Phase 2: Content & Proof (In Progress)
|
|
296
|
+
|
|
297
|
+
- [ ] **2-min demo video** — side-by-side agent with/without discipline. Post to X + YouTube.
|
|
298
|
+
- [ ] **"Why your AI agent keeps lying about being done"** — X thread / blog post
|
|
299
|
+
- [ ] **"Law of the Week" X series** — 7 weeks of content breaking down each law
|
|
300
|
+
|
|
301
|
+
### Phase 3: Ecosystem Integration
|
|
302
|
+
|
|
303
|
+
- [ ] **MCP server** — expose instinct status + law compliance as MCP tools
|
|
304
|
+
- [ ] **GitHub Action** — lint agent transcripts for law compliance
|
|
305
|
+
- [ ] **VS Code extension** — sidebar showing instinct confidence levels
|
|
306
|
+
- [ ] **Aider / Windsurf / Zed** support
|
|
307
|
+
|
|
308
|
+
### Phase 4: Community
|
|
309
|
+
|
|
310
|
+
- [ ] **Instinct marketplace** — share learned instincts across teams
|
|
311
|
+
- [ ] **Quick-start instinct packs** — pre-built instincts for React, Python, Go, etc.
|
|
312
|
+
- [ ] **Conference talk on Mulahazah** — the auto-leveling system is genuinely novel
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
159
316
|
## License
|
|
160
317
|
|
|
161
318
|
MIT
|
package/bin/analyze.sh
CHANGED
|
@@ -118,49 +118,35 @@ fi
|
|
|
118
118
|
mkdir -p "$PROJECT_DIR"
|
|
119
119
|
|
|
120
120
|
NEW_COUNT=0
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
if [[ -n "$
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
if [[ -n "$INSTINCT_ID" ]]; then
|
|
141
|
-
DEST="${PROJECT_DIR}/${INSTINCT_ID}.yaml"
|
|
142
|
-
printf '%s\n' "$BLOCK" > "$DEST"
|
|
143
|
-
echo " + ${INSTINCT_ID} → ${DEST}"
|
|
144
|
-
NEW_COUNT=$((NEW_COUNT + 1))
|
|
145
|
-
fi
|
|
146
|
-
INSTINCT_ID=""
|
|
147
|
-
BLOCK=""
|
|
148
|
-
else
|
|
149
|
-
BLOCK="${BLOCK}${line}"$'\n'
|
|
150
|
-
if [[ "$line" =~ ^id:\ (.+) ]]; then
|
|
151
|
-
INSTINCT_ID="${BASH_REMATCH[1]}"
|
|
152
|
-
INSTINCT_ID="${INSTINCT_ID//\"/}"
|
|
153
|
-
INSTINCT_ID="${INSTINCT_ID//\'/}"
|
|
154
|
-
fi
|
|
121
|
+
INSTINCT_ID=""
|
|
122
|
+
BLOCK=""
|
|
123
|
+
|
|
124
|
+
while IFS= read -r line; do
|
|
125
|
+
if [[ "$line" == "---" ]] && [[ -n "$BLOCK" ]]; then
|
|
126
|
+
if [[ -n "$INSTINCT_ID" ]]; then
|
|
127
|
+
DEST="${PROJECT_DIR}/${INSTINCT_ID}.yaml"
|
|
128
|
+
printf '%s\n' "$BLOCK" > "$DEST"
|
|
129
|
+
echo " + ${INSTINCT_ID} -> ${DEST}"
|
|
130
|
+
NEW_COUNT=$((NEW_COUNT + 1))
|
|
131
|
+
fi
|
|
132
|
+
INSTINCT_ID=""
|
|
133
|
+
BLOCK=""
|
|
134
|
+
else
|
|
135
|
+
BLOCK="${BLOCK}${line}"$'\n'
|
|
136
|
+
if [[ "$line" =~ ^id:\ (.+) ]]; then
|
|
137
|
+
INSTINCT_ID="${BASH_REMATCH[1]}"
|
|
138
|
+
INSTINCT_ID="${INSTINCT_ID//\"/}"
|
|
139
|
+
INSTINCT_ID="${INSTINCT_ID//\'/}"
|
|
155
140
|
fi
|
|
156
|
-
done <<< "$RESULT"
|
|
157
|
-
# Handle last block
|
|
158
|
-
if [[ -n "$INSTINCT_ID" ]] && [[ -n "$BLOCK" ]]; then
|
|
159
|
-
DEST="${PROJECT_DIR}/${INSTINCT_ID}.yaml"
|
|
160
|
-
printf '%s\n' "$BLOCK" > "$DEST"
|
|
161
|
-
echo " + ${INSTINCT_ID} → ${DEST}"
|
|
162
|
-
NEW_COUNT=$((NEW_COUNT + 1))
|
|
163
141
|
fi
|
|
142
|
+
done <<< "$RESULT"
|
|
143
|
+
|
|
144
|
+
# Handle last block
|
|
145
|
+
if [[ -n "$INSTINCT_ID" ]] && [[ -n "$BLOCK" ]]; then
|
|
146
|
+
DEST="${PROJECT_DIR}/${INSTINCT_ID}.yaml"
|
|
147
|
+
printf '%s\n' "$BLOCK" > "$DEST"
|
|
148
|
+
echo " + ${INSTINCT_ID} -> ${DEST}"
|
|
149
|
+
NEW_COUNT=$((NEW_COUNT + 1))
|
|
164
150
|
fi
|
|
165
151
|
|
|
166
152
|
echo ""
|