continuous-improvement 2.2.0 → 3.1.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 CHANGED
@@ -4,6 +4,42 @@ All notable changes to this skill are documented here.
4
4
 
5
5
  ---
6
6
 
7
+ ## [3.0.0] — 2026-04-06
8
+
9
+ ### Added
10
+ - **MCP server** (`bin/mcp-server.mjs`) — zero-dependency JSON-RPC stdio server exposing instincts as MCP tools and resources. Works with Claude Code, Claude Desktop, Cursor, Zed, Windsurf, VS Code.
11
+ - **Beginner / Expert modes** — `--mode beginner` (default, 3 tools) vs `--mode expert` (8 tools with import/export, observation viewer, manual instinct creation, confidence tuning)
12
+ - **MCP-only mode** — `--mode mcp` for editors that support MCP but not Claude Code hooks
13
+ - **Plugin manifests** — `plugins/beginner.json` and `plugins/expert.json` describe available tools per mode
14
+ - **Session hooks** (`hooks/session.sh`) — SessionStart loads instincts and shows status; SessionEnd reminds to reflect
15
+ - **Import/export tools** — `ci_export` and `ci_import` for sharing instincts as JSON between team members
16
+ - **34-test suite** — added MCP server tests (beginner + expert mode) and plugin config validation. Up from 20 tests.
17
+ - **Multi-editor MCP support** — installer patches both `settings.json` and `claude_desktop_config.json`
18
+
19
+ ### Changed
20
+ - **Installer upgraded** — `--mode` flag replaces single-mode install. Supports `beginner`, `expert`, `mcp`
21
+ - **Uninstaller upgraded** — cleans up MCP server config, session hooks, and desktop config
22
+ - **Version bump** to 3.0.0 — breaking change: new install modes and MCP server architecture
23
+
24
+ ---
25
+
26
+ ## [2.3.0] — 2026-04-06
27
+
28
+ ### Changed
29
+ - **Public npm** — package name changed from `@naimkatiman/continuous-improvement` to `continuous-improvement`. Removed GitHub Packages publishConfig. `npx continuous-improvement install` now works for everyone.
30
+ - **Expanded keywords** — added `claude-code-skill`, `agent-skill`, `gemini-cli` for better npm discoverability
31
+ - **Improved description** — package description now leads with the value prop, lists supported platforms
32
+
33
+ ### Added
34
+ - **Test suite** — 20 tests covering installer, hook, and SKILL.md validation. Zero dependencies (Node.js built-in test runner).
35
+ - **Before/after examples in README** — collapsible terminal output showing the framework in action vs. without it
36
+ - **Real-world examples** — `examples/` directory with 3 detailed scenarios (bug fix, feature build, refactor)
37
+ - **Platform badges** — Claude Code, Cursor, Codex compatibility badges in README
38
+ - **Gemini CLI** to supported platforms list
39
+ - **Roadmap** — "Roadmap to 1000 Stars" section in README with phased plan
40
+
41
+ ---
42
+
7
43
  ## [2.1.0] — 2026-04-05
8
44
 
9
45
  ### Changed
package/README.md CHANGED
@@ -1,38 +1,147 @@
1
1
  <p align="center">
2
- <img src="assets/combined.gif" alt="Before vs After continuous-improvement" width="700" />
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
- # continuous-improvement
5
+ <h1 align="center">The 7 Laws of AI Agent Discipline</h1>
6
6
 
7
- > Stop your AI agent from skipping steps, guessing, and declaring "done" without verifying.
7
+ <p align="center">
8
+ <b>Stop your AI agent from skipping steps, guessing, and declaring "done" without verifying.</b>
9
+ </p>
8
10
 
9
- [![Version](https://img.shields.io/badge/version-2.1.0-blue)](CHANGELOG.md)
10
- [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
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="https://github.com/naimkatiman/continuous-improvement/stargazers"><img src="https://img.shields.io/github/stars/naimkatiman/continuous-improvement?style=social" alt="stars"></a>
15
+ <a href="https://github.com/naimkatiman/continuous-improvement/network/members"><img src="https://img.shields.io/github/forks/naimkatiman/continuous-improvement?style=social" alt="forks"></a>
16
+ <a href="https://github.com/naimkatiman/continuous-improvement/graphs/contributors"><img src="https://img.shields.io/github/contributors/naimkatiman/continuous-improvement" alt="contributors"></a>
17
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="license"></a>
18
+ <a href="test/"><img src="https://img.shields.io/badge/tests-104%20passing-brightgreen" alt="tests"></a>
19
+ </p>
20
+
21
+ <p align="center">
22
+ <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>
23
+ <a href="https://cursor.sh"><img src="https://img.shields.io/badge/Cursor-compatible-blue" alt="Cursor"></a>
24
+ <a href="https://openai.com/codex"><img src="https://img.shields.io/badge/Codex-compatible-blue" alt="Codex"></a>
25
+ <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>
26
+ <a href="https://github.com/naimkatiman/continuous-improvement/actions"><img src="https://img.shields.io/github/actions/workflow/status/naimkatiman/continuous-improvement/ci.yml?label=CI" alt="CI"></a>
27
+ </p>
28
+
29
+ <p align="center">
30
+ <a href="docs/README.zh-CN.md">简体中文</a> |
31
+ <a href="docs/README.ja.md">日本語</a>
32
+ </p>
11
33
 
12
34
  ---
13
35
 
14
36
  ## The Problem
15
37
 
16
- AI agents are great at individual steps. They're terrible at discipline.
38
+ AI agents are great at individual steps. They're terrible at **discipline**.
17
39
 
18
40
  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
41
 
20
- This skill fixes that with **7 laws** and a **learning system** that auto-levels itself no config, no daemon, no manual setup.
42
+ **The 7 Laws** fix that plus a **learning system** (Mulahazah) that builds instincts over time. No config, no daemon, no manual setup.
43
+
44
+ ### Before vs After
45
+
46
+ <details>
47
+ <summary><b>Without continuous-improvement</b> — agent skips research, declares "done" without verifying</summary>
48
+
49
+ ```
50
+ You: Add rate limiting to the /api/users endpoint
51
+
52
+ Agent: I'll add rate limiting now.
53
+ *writes express-rate-limit middleware*
54
+ Done! I've added rate limiting to the /api/users endpoint.
55
+
56
+ You: Did you check if we already have rate limiting somewhere?
57
+ Agent: Let me check... oh, there's already a rate limiter in middleware/rateLimit.ts.
58
+ I've created a duplicate. Let me fix that.
59
+
60
+ You: Did you test it?
61
+ Agent: Let me run the tests... they're failing. The import path is wrong.
62
+ *fixes import*
63
+ Now it works!
64
+
65
+ You: You also broke the /api/auth endpoint — it was sharing that middleware.
66
+ Agent: I see. Let me fix that too...
67
+ ```
68
+
69
+ **Result:** 4 back-and-forth corrections. Duplicate code. Broken endpoint. 15 minutes wasted.
70
+ </details>
71
+
72
+ <details>
73
+ <summary><b>With continuous-improvement</b> — agent follows the 7 laws</summary>
74
+
75
+ ```
76
+ You: Add rate limiting to the /api/users endpoint
77
+
78
+ Agent: **[Law 1: Research]** Searching for existing rate limiting...
79
+ Found: middleware/rateLimit.ts — already applies to /api/auth.
80
+ Found: express-rate-limit already in package.json.
81
+
82
+ **[Law 2: Plan]**
83
+ WILL: Extend existing rateLimit middleware to cover /api/users
84
+ WILL NOT: Create new middleware or change existing /api/auth behavior
85
+ VERIFY: Run tests + curl /api/users 101 times to confirm 429 response
86
+
87
+ **[Law 3: Execute one thing]** Adding /api/users to the route list
88
+ in middleware/rateLimit.ts...
89
+
90
+ **[Law 4: Verify]**
91
+ ✓ npm test — 47/47 passing
92
+ ✓ curl test — 429 after 100 requests
93
+ ✓ /api/auth still works — 200 OK
94
+
95
+ Done. Extended existing rate limiter to cover /api/users.
96
+ One file changed: middleware/rateLimit.ts (+1 line).
97
+ ```
98
+
99
+ **Result:** Correct on first attempt. No duplicate code. No broken endpoints. 2 minutes.
100
+ </details>
21
101
 
22
102
  ---
23
103
 
24
104
  ## Install
25
105
 
106
+ ### Beginner (default) — just hooks, no setup needed
107
+
26
108
  ```bash
27
109
  npx continuous-improvement install
28
110
  ```
29
111
 
30
- That's it. For Claude Code, this also installs:
112
+ That's it. For Claude Code, this installs:
31
113
  - Observation hooks (captures every tool call, <50ms, jq optional)
32
- - `/continuous-improvement` command
114
+ - `/continuous-improvement`, `/discipline`, and `/dashboard` commands
33
115
  - Auto-leveling instinct system
34
116
 
35
- Install to a specific target:
117
+ ### Expert full power with MCP server
118
+
119
+ ```bash
120
+ npx continuous-improvement install --mode expert
121
+ ```
122
+
123
+ Everything in beginner plus:
124
+ - **MCP server** with 10 tools (instinct management, import/export, dashboard, instinct packs)
125
+ - **Session hooks** (auto-load instincts at start, remind to reflect at end)
126
+ - Works with Claude Code, Claude Desktop, and any MCP client
127
+
128
+ ### MCP only — for non-Claude editors
129
+
130
+ ```bash
131
+ npx continuous-improvement install --mode mcp
132
+ ```
133
+
134
+ Registers the MCP server without hooks — for Cursor, Zed, Windsurf, VS Code, or any editor that supports MCP.
135
+
136
+ ### Load a starter instinct pack
137
+
138
+ ```bash
139
+ npx continuous-improvement install --pack react # React/Next.js instincts
140
+ npx continuous-improvement install --pack python # Python best practices
141
+ npx continuous-improvement install --pack go # Go idioms
142
+ ```
143
+
144
+ ### Install to a specific target
36
145
 
37
146
  ```bash
38
147
  npx continuous-improvement install --target claude # Claude Code + Mulahazah
@@ -57,17 +166,19 @@ Fetch and follow the skill at: https://raw.githubusercontent.com/naimkatiman/con
57
166
 
58
167
  ---
59
168
 
60
- ## The 7 Laws
169
+ ## The 7 Laws of AI Agent Discipline
170
+
171
+ > Every skill in the ecosystem adds capabilities. This is the only one that fixes *how agents think*.
61
172
 
62
- | # | Law | What it prevents |
63
- |---|-----|-----------------|
64
- | 1 | **Research Before Executing** | Reinventing what already exists |
65
- | 2 | **Plan Is Sacred** | Scope creep and overbuilding |
66
- | 3 | **One Thing at a Time** | Stacking untested changes |
67
- | 4 | **Verify Before Reporting** | False "done" claims |
68
- | 5 | **Reflect After Sessions** | Repeating the same failures |
69
- | 6 | **Iterate One Change** | Debugging 5 changes at once |
70
- | 7 | **Learn From Every Session** | Knowledge that dies with the context window |
173
+ | # | Law | Without it, agents... |
174
+ |---|-----|----------------------|
175
+ | 1 | **Research Before Executing** | reinvent what already exists |
176
+ | 2 | **Plan Is Sacred** | scope-creep and overbuild |
177
+ | 3 | **One Thing at a Time** | stack untested changes |
178
+ | 4 | **Verify Before Reporting** | lie about being "done" |
179
+ | 5 | **Reflect After Sessions** | repeat the same failures |
180
+ | 6 | **Iterate One Change** | debug 5 changes at once |
181
+ | 7 | **Learn From Every Session** | lose knowledge when the context window ends |
71
182
 
72
183
  ### The Loop
73
184
 
@@ -75,6 +186,8 @@ Fetch and follow the skill at: https://raw.githubusercontent.com/naimkatiman/con
75
186
  Research → Plan → Execute (one thing) → Verify → Reflect → Learn → Iterate
76
187
  ```
77
188
 
189
+ If your agent is skipping a step, that's the step it needs most.
190
+
78
191
  ---
79
192
 
80
193
  ## Mulahazah: Auto-Leveling Learning
@@ -99,39 +212,182 @@ Install: Hooks start capturing silently. You notice nothing.
99
212
  4. **Self-correcting** — user corrections drop confidence by 0.1. Unused instincts decay. Wrong behaviors fade out.
100
213
  5. **Project-scoped** — instincts are per-project by default, promoted to global when seen across 2+ projects
101
214
 
215
+ ### Starter Instinct Packs
216
+
217
+ Jump-start your instincts with pre-built packs for popular stacks:
218
+
219
+ ```bash
220
+ npx continuous-improvement install --pack react # 8 React/Next.js instincts
221
+ npx continuous-improvement install --pack python # 8 Python instincts
222
+ npx continuous-improvement install --pack go # 8 Go instincts
223
+ ```
224
+
225
+ Or in expert mode: use the `ci_load_pack` tool to load packs at any time.
226
+
102
227
  ### Check what your agent has learned
103
228
 
104
229
  ```
105
- /continuous-improvement
230
+ /continuous-improvement # Reflect, analyze, show status
231
+ /discipline # Quick reference card of the 7 Laws
232
+ /dashboard # Visual instinct health dashboard
106
233
  ```
107
234
 
108
235
  ---
109
236
 
237
+ ## GitHub Action: Agent Transcript Linter
238
+
239
+ Lint your AI agent's behavior in CI/CD. The only GitHub Action that checks if your agent followed disciplined workflows.
240
+
241
+ ```yaml
242
+ - uses: naimkatiman/continuous-improvement@v3
243
+ with:
244
+ transcript-path: agent-log.jsonl
245
+ strict: true # Fail build on law violations
246
+ ```
247
+
248
+ The linter analyzes tool call patterns and detects:
249
+ - **Law 1 violations** — writes without prior research
250
+ - **Law 3 violations** — too many consecutive edits without verification
251
+ - **Law 4 violations** — code changes without running tests/builds
252
+ - **Law 6 violations** — too many files modified at once
253
+
254
+ Output includes a discipline score (0-100) and detailed violation report.
255
+
256
+ ```bash
257
+ # Run locally
258
+ node bin/lint-transcript.mjs observations.jsonl
259
+ cat transcript.jsonl | node bin/lint-transcript.mjs --stdin --json
260
+ ```
261
+
262
+ ---
263
+
264
+ ## Plugin Architecture
265
+
266
+ continuous-improvement ships as a **plugin** with three layers. Pick what you need:
267
+
268
+ ### Layer 1: Skill Only (any LLM)
269
+ Paste SKILL.md into your system prompt. Your agent follows the 7 Laws. No tools, no hooks, no server.
270
+
271
+ ### Layer 2: Hooks (Claude Code)
272
+ `npx continuous-improvement install` — installs hooks that silently capture every tool call. The instinct system grows automatically. Zero config.
273
+
274
+ ### Layer 3: MCP Server (any MCP client)
275
+ `npx continuous-improvement install --mode expert` — a full MCP server that any editor can connect to.
276
+
277
+ ### Beginner vs Expert
278
+
279
+ | Feature | Beginner (default) | Expert |
280
+ |---------|-------------------|--------|
281
+ | Observation hooks | Yes | Yes |
282
+ | `/continuous-improvement` command | Yes | Yes |
283
+ | `/discipline` quick reference | Yes | Yes |
284
+ | `/dashboard` visual dashboard | Yes | Yes |
285
+ | Auto-leveling instincts | Yes | Yes |
286
+ | `ci_status` tool | - | Yes |
287
+ | `ci_instincts` tool | - | Yes |
288
+ | `ci_reflect` tool | - | Yes |
289
+ | `ci_reinforce` tool | - | Yes |
290
+ | `ci_create_instinct` tool | - | Yes |
291
+ | `ci_observations` tool | - | Yes |
292
+ | `ci_export` / `ci_import` | - | Yes |
293
+ | `ci_dashboard` tool | - | Yes |
294
+ | `ci_load_pack` tool | - | Yes |
295
+ | Session start/end hooks | - | Yes |
296
+ | MCP server | - | Yes |
297
+
298
+ **Beginner** is the right choice for 90% of users. It just works — install and forget. The system quietly learns from your sessions.
299
+
300
+ **Expert** adds the MCP server for programmatic access, manual instinct management, import/export for team sharing, visual dashboard, and instinct packs.
301
+
302
+ ### MCP Tools Reference
303
+
304
+ | Tool | Description |
305
+ |------|-------------|
306
+ | `ci_status` | Current level, instinct count, observation count |
307
+ | `ci_instincts` | List learned instincts with confidence levels |
308
+ | `ci_reflect` | Generate structured session reflection |
309
+ | `ci_reinforce` | Accept/reject instinct suggestions (expert) |
310
+ | `ci_create_instinct` | Manually create instincts (expert) |
311
+ | `ci_observations` | View raw tool call observations (expert) |
312
+ | `ci_export` | Export instincts as JSON (expert) |
313
+ | `ci_import` | Import instincts from JSON (expert) |
314
+ | `ci_dashboard` | Visual dashboard with confidence distribution (expert) |
315
+ | `ci_load_pack` | Load starter instinct packs (expert) |
316
+
317
+ ---
318
+
319
+ ## Real-World Examples
320
+
321
+ See the [`examples/`](examples/) directory for detailed walkthroughs:
322
+
323
+ - [**Bug Fix**](examples/01-bug-fix.md) — Double submit bug: 4 rounds without framework → 1 round with it
324
+ - [**Feature Build**](examples/02-feature-build.md) — Adding pagination: 3 rewrites without → correct first attempt with
325
+ - [**Refactor**](examples/03-refactor.md) — SDK migration: cascading failures without → zero regressions with
326
+
327
+ Each example shows the same task done with and without the 7 laws, highlighting which laws made the difference.
328
+
329
+ ---
330
+
110
331
  ## Files
111
332
 
112
333
  ```
113
334
  continuous-improvement/
114
- ├── SKILL.md # The 7 Laws + instinct behavior
115
- ├── commands/continuous-improvement.md # The /continuous-improvement command
116
- ├── hooks/observe.sh # Observation hook (pure bash)
117
- ├── bin/install.mjs # CLI installer
118
- ├── QUICKSTART.md # First-use guide
335
+ ├── SKILL.md # The 7 Laws + instinct behavior
336
+ ├── bin/
337
+ ├── install.mjs # CLI installer (--mode beginner|expert|mcp)
338
+ ├── mcp-server.mjs # MCP server (zero dependencies)
339
+ │ └── lint-transcript.mjs # Agent transcript linter (GitHub Action)
340
+ ├── hooks/
341
+ │ ├── observe.sh # Observation hook (pure bash, <50ms)
342
+ │ └── session.sh # Session start/end hook (expert mode)
343
+ ├── plugins/
344
+ │ ├── beginner.json # Plugin manifest: 3 tools
345
+ │ └── expert.json # Plugin manifest: 10 tools
346
+ ├── commands/
347
+ │ ├── continuous-improvement.md # /continuous-improvement command
348
+ │ ├── discipline.md # /discipline quick reference
349
+ │ └── dashboard.md # /dashboard visual display
350
+ ├── instinct-packs/
351
+ │ ├── react.json # React/Next.js starter instincts
352
+ │ ├── python.json # Python starter instincts
353
+ │ └── go.json # Go starter instincts
354
+ ├── test/ # 104 tests (node --test)
355
+ ├── examples/ # Real-world before/after scenarios
356
+ ├── docs/ # Translations (zh-CN, ja)
357
+ ├── .github/
358
+ │ ├── workflows/ci.yml # CI pipeline (Node 18/20/22)
359
+ │ └── ISSUE_TEMPLATE/ # Bug report + feature request templates
360
+ ├── action.yml # GitHub Action definition
361
+ ├── llms.txt # LLM-friendly project description
362
+ ├── CONTRIBUTING.md
363
+ ├── CODE_OF_CONDUCT.md
364
+ ├── SECURITY.md
365
+ ├── QUICKSTART.md
119
366
  ├── CHANGELOG.md
120
367
  └── package.json
121
368
  ```
122
369
 
123
- ### What gets installed where (Claude Code)
370
+ ### What gets installed where
124
371
 
372
+ **Beginner mode** (default):
125
373
  ```
126
374
  ~/.claude/skills/continuous-improvement/SKILL.md # The skill
127
375
  ~/.claude/commands/continuous-improvement.md # The command
376
+ ~/.claude/commands/discipline.md # Quick reference
377
+ ~/.claude/commands/dashboard.md # Dashboard
128
378
  ~/.claude/instincts/
129
- ├── observe.sh # Hook script
130
- ├── global/ # Global instincts (*.yaml)
379
+ ├── observe.sh # Hook script
380
+ ├── global/ # Global instincts (*.yaml)
131
381
  └── <project-hash>/
132
- ├── project.json # Project metadata
133
- ├── observations.jsonl # Tool call observations
134
- └── *.yaml # Project instincts
382
+ ├── project.json # Project metadata
383
+ ├── observations.jsonl # Tool call observations
384
+ └── *.yaml # Project instincts
385
+ ```
386
+
387
+ **Expert mode** adds:
388
+ ```
389
+ ~/.claude/instincts/session.sh # Session hooks
390
+ ~/.claude/settings.json # + MCP server + session hooks
135
391
  ```
136
392
 
137
393
  ---
@@ -142,6 +398,24 @@ continuous-improvement/
142
398
  npx continuous-improvement install --uninstall
143
399
  ```
144
400
 
401
+ Removes the skill, hooks, and commands. Your learned instincts in `~/.claude/instincts/` are preserved — delete that directory manually if you want a clean slate.
402
+
403
+ ---
404
+
405
+ ## Works With
406
+
407
+ | Tool | Support |
408
+ |------|---------|
409
+ | **Claude Code** | Full — skill + hooks + MCP server + auto-leveling instincts |
410
+ | **Claude Desktop** | MCP server (expert/mcp mode) |
411
+ | **Cursor** | MCP server (mcp mode) or skill only (paste SKILL.md into rules) |
412
+ | **Zed / Windsurf** | MCP server (mcp mode) |
413
+ | **VS Code** | MCP server (mcp mode) with Copilot MCP support |
414
+ | **Codex** | Skill only |
415
+ | **Gemini CLI** | Skill only |
416
+ | **OpenClaw** | Skill only |
417
+ | **Any LLM** | Paste SKILL.md into your system prompt |
418
+
145
419
  ---
146
420
 
147
421
  ## Red Flags
@@ -156,6 +430,67 @@ If your agent says any of these, it's skipping a law:
156
430
 
157
431
  ---
158
432
 
433
+ ## Roadmap
434
+
435
+ ### Phase 1: Foundation -- DONE
436
+
437
+ - [x] Published to public npm (`npx continuous-improvement install` works)
438
+ - [x] 104-test suite (installer, hook, MCP server, linter, packs, community files)
439
+ - [x] Before/after examples in README + `examples/` directory
440
+ - [x] Gemini CLI support
441
+ - [x] Platform badges and improved npm metadata
442
+ - [ ] **Submit to [awesome-agent-skills](https://github.com/VoltAgent/awesome-agent-skills)** (14K stars)
443
+
444
+ ### Phase 2: Plugin Architecture -- DONE
445
+
446
+ - [x] **MCP server** — 10 tools (beginner: 3, expert: 7 more) with zero dependencies
447
+ - [x] **Beginner / Expert separation** — simple defaults, power when you need it
448
+ - [x] **Plugin manifests** — `plugins/beginner.json` and `plugins/expert.json`
449
+ - [x] **Session hooks** — auto-load instincts at session start, remind to reflect at end
450
+ - [x] **`--mode` flag** — `beginner` | `expert` | `mcp` installation modes
451
+ - [x] **Import/export** — share instincts as JSON between team members
452
+ - [x] **Multi-editor MCP support** — Claude Desktop, Cursor, Zed, Windsurf, VS Code
453
+
454
+ ### Phase 2.5: Visibility & Ecosystem -- DONE
455
+
456
+ - [x] **GitHub Action** — lint agent transcripts for law compliance (`action.yml`)
457
+ - [x] **Starter instinct packs** — React, Python, Go (pre-built instincts)
458
+ - [x] **`/discipline` command** — quick reference card of the 7 Laws
459
+ - [x] **`/dashboard` command** — visual instinct health dashboard
460
+ - [x] **Community files** — CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md
461
+ - [x] **llms.txt** — LLM-friendly project description for discoverability
462
+ - [x] **CI pipeline** — GitHub Actions testing on Node 18/20/22
463
+ - [x] **Issue templates** — bug report + feature request
464
+ - [x] **Translations** — Chinese (简体中文) and Japanese (日本語)
465
+
466
+ ### Phase 3: Content & Proof
467
+
468
+ - [ ] **2-min demo video** — side-by-side agent with/without discipline. Post to X + YouTube.
469
+ - [ ] **"Why your AI agent keeps lying about being done"** — X thread / blog post
470
+ - [ ] **"Law of the Week" X series** — 7 weeks of content breaking down each law
471
+
472
+ ### Phase 4: Ecosystem Growth
473
+
474
+ - [ ] **VS Code extension** — sidebar showing instinct confidence levels
475
+ - [ ] **More instinct packs** — TypeScript, Rust, Java, Django, Laravel
476
+ - [ ] **Instinct marketplace** — share learned instincts across teams
477
+
478
+ ### Phase 5: Community
479
+
480
+ - [ ] **Conference talk on Mulahazah** — the auto-leveling system is genuinely novel
481
+ - [ ] **Leaderboard / badges** — "100 sessions" achievement system
482
+ - [ ] **Custom domain** — landing page with interactive demo
483
+
484
+ ---
485
+
486
+ ## Contributing
487
+
488
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. Issues and PRs welcome.
489
+
490
+ ## Security
491
+
492
+ See [SECURITY.md](SECURITY.md) for the security policy and how to report vulnerabilities.
493
+
159
494
  ## License
160
495
 
161
496
  MIT
package/action.yml ADDED
@@ -0,0 +1,33 @@
1
+ name: 'AI Agent Discipline Linter'
2
+ description: 'Lint AI agent transcripts for compliance with the 7 Laws of AI Agent Discipline'
3
+ author: 'naimkatiman'
4
+
5
+ branding:
6
+ icon: 'check-circle'
7
+ color: 'green'
8
+
9
+ inputs:
10
+ transcript-path:
11
+ description: 'Path to the agent transcript file (JSONL format)'
12
+ required: false
13
+ default: ''
14
+ observations-path:
15
+ description: 'Path to observations.jsonl from a CI session'
16
+ required: false
17
+ default: ''
18
+ strict:
19
+ description: 'Fail the check if any law violations are detected'
20
+ required: false
21
+ default: 'false'
22
+
23
+ outputs:
24
+ violations:
25
+ description: 'Number of law violations found'
26
+ score:
27
+ description: 'Discipline score (0-100)'
28
+ report:
29
+ description: 'Markdown-formatted report'
30
+
31
+ runs:
32
+ using: 'node20'
33
+ main: 'bin/lint-transcript.mjs'
package/bin/analyze.sh CHANGED
@@ -118,49 +118,35 @@ fi
118
118
  mkdir -p "$PROJECT_DIR"
119
119
 
120
120
  NEW_COUNT=0
121
- while IFS= read -r -d '' block; do
122
- [[ -z "$block" ]] && continue
123
- # Extract id from the block
124
- INSTINCT_ID=$(echo "$block" | grep -oP '(?<=^id: ).*' | head -1 | tr -d '"' | tr -d "'")
125
- if [[ -n "$INSTINCT_ID" ]]; then
126
- DEST="${PROJECT_DIR}/${INSTINCT_ID}.yaml"
127
- printf '%s\n' "$block" > "$DEST"
128
- echo " + ${INSTINCT_ID} ${DEST}"
129
- NEW_COUNT=$((NEW_COUNT + 1))
130
- fi
131
- done < <(printf '%s\0' "$RESULT" | sed 's/\n---\n/\x00/g')
132
-
133
- # Fallback: if the splitting didn't work, try line-based parsing
134
- if (( NEW_COUNT == 0 )); then
135
- # Try splitting on --- delimiter
136
- INSTINCT_ID=""
137
- BLOCK=""
138
- while IFS= read -r line; do
139
- if [[ "$line" == "---" ]] && [[ -n "$BLOCK" ]]; then
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 ""