cognitive-modules 2.2.0__tar.gz → 2.2.2__tar.gz

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.
Files changed (32) hide show
  1. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/PKG-INFO +72 -55
  2. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/README.md +71 -54
  3. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/pyproject.toml +2 -2
  4. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/src/cognitive/loader.py +8 -4
  5. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/src/cognitive/providers/__init__.py +152 -1
  6. cognitive_modules-2.2.2/src/cognitive/runner.py +1192 -0
  7. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/src/cognitive/validator.py +2 -4
  8. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/src/cognitive_modules.egg-info/PKG-INFO +72 -55
  9. cognitive_modules-2.2.2/src/cognitive_modules.egg-info/entry_points.txt +2 -0
  10. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/tests/test_runner.py +309 -7
  11. cognitive_modules-2.2.0/src/cognitive/runner.py +0 -654
  12. cognitive_modules-2.2.0/src/cognitive_modules.egg-info/entry_points.txt +0 -2
  13. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/LICENSE +0 -0
  14. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/setup.cfg +0 -0
  15. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/src/cognitive/__init__.py +0 -0
  16. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/src/cognitive/cli.py +0 -0
  17. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/src/cognitive/mcp_server.py +0 -0
  18. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/src/cognitive/migrate.py +0 -0
  19. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/src/cognitive/registry.py +0 -0
  20. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/src/cognitive/server.py +0 -0
  21. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/src/cognitive/subagent.py +0 -0
  22. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/src/cognitive/templates.py +0 -0
  23. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/src/cognitive_modules.egg-info/SOURCES.txt +0 -0
  24. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/src/cognitive_modules.egg-info/dependency_links.txt +0 -0
  25. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/src/cognitive_modules.egg-info/requires.txt +0 -0
  26. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/src/cognitive_modules.egg-info/top_level.txt +0 -0
  27. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/tests/test_cli.py +0 -0
  28. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/tests/test_loader.py +0 -0
  29. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/tests/test_migrate.py +0 -0
  30. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/tests/test_registry.py +0 -0
  31. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/tests/test_subagent.py +0 -0
  32. {cognitive_modules-2.2.0 → cognitive_modules-2.2.2}/tests/test_validator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cognitive-modules
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: Structured LLM task runner with schema validation, confidence scoring, and subagent orchestration
5
5
  Author: ziel-io
6
6
  License: MIT
@@ -59,7 +59,10 @@ Dynamic: license-file
59
59
  # Cognitive Modules
60
60
 
61
61
  [![CI](https://github.com/ziel-io/cognitive-modules/actions/workflows/ci.yml/badge.svg)](https://github.com/ziel-io/cognitive-modules/actions/workflows/ci.yml)
62
- [![PyPI version](https://badge.fury.io/py/cognitive-modules.svg)](https://pypi.org/project/cognitive-modules/)
62
+ [![npm version](https://img.shields.io/npm/v/cognitive-modules-cli.svg)](https://www.npmjs.com/package/cognitive-modules-cli)
63
+ [![PyPI version](https://img.shields.io/pypi/v/cognitive-modules.svg)](https://pypi.org/project/cognitive-modules/)
64
+ [![npm downloads](https://img.shields.io/npm/dm/cognitive-modules-cli.svg)](https://www.npmjs.com/package/cognitive-modules-cli)
65
+ [![Node.js 18+](https://img.shields.io/badge/node-18+-green.svg)](https://nodejs.org/)
63
66
  [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
64
67
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
65
68
 
@@ -88,7 +91,24 @@ Cognitive Modules is an AI task definition specification designed for generation
88
91
  - **Subagent Orchestration** - `@call:module` supports inter-module calls
89
92
  - **Parameter Passing** - `$ARGUMENTS` runtime substitution
90
93
  - **Multi-LLM Support** - OpenAI / Anthropic / MiniMax / Ollama
91
- - **Public Registry** - `cogn install registry:module-name`
94
+ - **Public Registry** - `cog install registry:module-name`
95
+
96
+ ## Version Selection
97
+
98
+ | Version | Spec | npm | PyPI | Status |
99
+ |---------|------|-----|------|--------|
100
+ | **v2.2** | v2.2 | `2.2.0` | `2.2.1` | ✅ Stable (recommended) |
101
+ | **v2.5** | v2.5 | `2.5.0-beta.x` | `2.5.0bx` | 🧪 Beta (streaming + multimodal) |
102
+
103
+ ```bash
104
+ # Install stable v2.2
105
+ npm install cognitive-modules-cli@2.2.0
106
+ pip install cognitive-modules==2.2.1
107
+
108
+ # Install beta v2.5 (streaming + multimodal)
109
+ npm install cognitive-modules-cli@beta
110
+ pip install cognitive-modules==2.5.0b1
111
+ ```
92
112
 
93
113
  ## Installation
94
114
 
@@ -96,30 +116,27 @@ Cognitive Modules is an AI task definition specification designed for generation
96
116
 
97
117
  ```bash
98
118
  # Zero-install quick start (recommended)
99
- npx cogn run code-reviewer --args "your code"
119
+ npx cognitive-modules-cli@2.2.0 run code-reviewer --args "your code"
100
120
 
101
121
  # Global installation
102
- npm install -g cogn
103
-
104
- # Or install with full package name
105
- npm install -g cognitive-modules-cli
122
+ npm install -g cognitive-modules-cli@2.2.0
106
123
  ```
107
124
 
108
125
  ### Python (pip)
109
126
 
110
127
  ```bash
111
- pip install cognitive-modules
128
+ pip install cognitive-modules==2.2.1
112
129
 
113
130
  # With LLM support
114
- pip install cognitive-modules[openai] # OpenAI
115
- pip install cognitive-modules[anthropic] # Claude
116
- pip install cognitive-modules[all] # All providers
131
+ pip install "cognitive-modules[openai]==2.2.1" # OpenAI
132
+ pip install "cognitive-modules[anthropic]==2.2.1" # Claude
133
+ pip install "cognitive-modules[all]==2.2.1" # All providers
117
134
  ```
118
135
 
119
136
  | Platform | Package | Command | Features |
120
137
  |----------|---------|---------|----------|
121
- | **npm** | `cogn` | `cog` | ✅ Recommended, zero-install, full features |
122
- | pip | `cognitive-modules` | `cogn` | ✅ Full features |
138
+ | **npm** | `cognitive-modules-cli` | `cog` | ✅ Recommended, zero-install, full features |
139
+ | pip | `cognitive-modules` | `cog` | ✅ Full features |
123
140
 
124
141
  ## Quick Start
125
142
 
@@ -129,7 +146,7 @@ export LLM_PROVIDER=openai
129
146
  export OPENAI_API_KEY=sk-xxx
130
147
 
131
148
  # Run code review (npm)
132
- npx cogn run code-reviewer --args "def login(u,p): return db.query(f'SELECT * FROM users WHERE name={u}')" --pretty
149
+ npx cognitive-modules-cli run code-reviewer --args "def login(u,p): return db.query(f'SELECT * FROM users WHERE name={u}')" --pretty
133
150
 
134
151
  # Or use globally installed cog command
135
152
  cog run code-reviewer --args "..." --pretty
@@ -195,70 +212,70 @@ All modules now return the unified v2.2 envelope format:
195
212
  | **Risk Aggregation** | `meta.risk = max(changes[*].risk)` |
196
213
  | **Parameter Passing** | `$ARGUMENTS` runtime substitution |
197
214
  | **Subagents** | `@call:module` for inter-module calls |
198
- | **Validation Tools** | `cogn validate` / `cogn validate --v22` |
215
+ | **Validation Tools** | `cog validate` / `cog validate --v22` |
199
216
 
200
217
  ## Integration Methods
201
218
 
202
219
  | Method | Command | Use Case |
203
220
  |--------|---------|----------|
204
- | CLI | `cogn run` | Command line |
205
- | HTTP API | `cogn serve` | n8n, Coze, Dify |
206
- | MCP Server | `cogn mcp` | Claude, Cursor |
221
+ | CLI | `cog run` | Command line |
222
+ | HTTP API | `cog serve` | n8n, Coze, Dify |
223
+ | MCP Server | `cog mcp` | Claude, Cursor |
207
224
 
208
225
  ## CLI Commands
209
226
 
210
227
  ```bash
211
228
  # Module management
212
- cogn list # List installed modules
213
- cogn info <module> # View module details
214
- cogn validate <module> # Validate module structure
215
- cogn validate <module> --v22 # Validate v2.2 format
229
+ cog list # List installed modules
230
+ cog info <module> # View module details
231
+ cog validate <module> # Validate module structure
232
+ cog validate <module> --v22 # Validate v2.2 format
216
233
 
217
234
  # Run modules
218
- cogn run <module> input.json -o output.json --pretty
219
- cogn run <module> --args "requirements" --pretty
220
- cogn run <module> --args "requirements" --subagent # Enable subagent
235
+ cog run <module> input.json -o output.json --pretty
236
+ cog run <module> --args "requirements" --pretty
237
+ cog run <module> --args "requirements" --subagent # Enable subagent
221
238
 
222
239
  # Create modules
223
- cogn init <name> -d "description"
224
- cogn init <name> --format v22 # Create v2.2 format module
240
+ cog init <name> -d "description"
241
+ cog init <name> --format v22 # Create v2.2 format module
225
242
 
226
243
  # Migrate modules
227
- cogn migrate <module> # Migrate v1/v2.1 module to v2.2
244
+ cog migrate <module> # Migrate v1/v2.1 module to v2.2
228
245
 
229
246
  # Install from GitHub (recommended)
230
- cogn add ziel-io/cognitive-modules -m code-simplifier
231
- cogn add org/repo -m module-name --tag v1.0.0 # Install specific version
232
- cogn remove <module> # Remove module
247
+ cog add ziel-io/cognitive-modules -m code-simplifier
248
+ cog add org/repo -m module-name --tag v1.0.0 # Install specific version
249
+ cog remove <module> # Remove module
233
250
 
234
251
  # Version management
235
- cogn update <module> # Update to latest version
236
- cogn update <module> --tag v2.0.0 # Update to specific version
237
- cogn versions <url> # View available versions
252
+ cog update <module> # Update to latest version
253
+ cog update <module> --tag v2.0.0 # Update to specific version
254
+ cog versions <url> # View available versions
238
255
 
239
256
  # Other installation methods
240
- cogn install github:user/repo/path
241
- cogn install registry:module-name
242
- cogn uninstall <module>
257
+ cog install github:user/repo/path
258
+ cog install registry:module-name
259
+ cog uninstall <module>
243
260
 
244
261
  # Registry
245
- cogn registry # View public modules
246
- cogn search <query> # Search modules
262
+ cog registry # View public modules
263
+ cog search <query> # Search modules
247
264
 
248
265
  # Environment check
249
- cogn doctor
266
+ cog doctor
250
267
  ```
251
268
 
252
269
  ## Built-in Modules
253
270
 
254
271
  | Module | Tier | Function | Example |
255
272
  |--------|------|----------|---------|
256
- | `code-reviewer` | decision | Code review | `cogn run code-reviewer --args "your code"` |
257
- | `code-simplifier` | decision | Code simplification | `cogn run code-simplifier --args "complex code"` |
258
- | `task-prioritizer` | decision | Task priority sorting | `cogn run task-prioritizer --args "task1,task2"` |
259
- | `api-designer` | decision | REST API design | `cogn run api-designer --args "order system"` |
260
- | `ui-spec-generator` | exploration | UI spec generation | `cogn run ui-spec-generator --args "e-commerce homepage"` |
261
- | `product-analyzer` | exploration | Product analysis (subagent) | `cogn run product-analyzer --args "health product" -s` |
273
+ | `code-reviewer` | decision | Code review | `cog run code-reviewer --args "your code"` |
274
+ | `code-simplifier` | decision | Code simplification | `cog run code-simplifier --args "complex code"` |
275
+ | `task-prioritizer` | decision | Task priority sorting | `cog run task-prioritizer --args "task1,task2"` |
276
+ | `api-designer` | decision | REST API design | `cog run api-designer --args "order system"` |
277
+ | `ui-spec-generator` | exploration | UI spec generation | `cog run ui-spec-generator --args "e-commerce homepage"` |
278
+ | `product-analyzer` | exploration | Product analysis (subagent) | `cog run product-analyzer --args "health product" -s` |
262
279
 
263
280
  ## Module Format
264
281
 
@@ -370,7 +387,7 @@ export MINIMAX_API_KEY=sk-xxx
370
387
  export LLM_PROVIDER=ollama
371
388
 
372
389
  # Check configuration
373
- cogn doctor
390
+ cog doctor
374
391
  ```
375
392
 
376
393
  ## Migrating to v2.2
@@ -379,13 +396,13 @@ Migrate from v1 or v2.1 modules to v2.2:
379
396
 
380
397
  ```bash
381
398
  # Auto-migrate single module
382
- cogn migrate code-reviewer
399
+ cog migrate code-reviewer
383
400
 
384
401
  # Migrate all modules
385
- cogn migrate --all
402
+ cog migrate --all
386
403
 
387
404
  # Verify migration result
388
- cogn validate code-reviewer --v22
405
+ cog validate code-reviewer --v22
389
406
  ```
390
407
 
391
408
  Manual migration steps:
@@ -408,8 +425,8 @@ pip install -e ".[dev]"
408
425
  pytest tests/ -v
409
426
 
410
427
  # Create new module (v2.2 format)
411
- cogn init my-module -d "module description" --format v22
412
- cogn validate my-module --v22
428
+ cog init my-module -d "module description" --format v22
429
+ cog validate my-module --v22
413
430
  ```
414
431
 
415
432
  ## Project Structure
@@ -443,8 +460,8 @@ cognitive-modules/
443
460
 
444
461
  | Platform | Package | Command | Installation |
445
462
  |----------|---------|---------|--------------|
446
- | Python | `cognitive-modules` | `cogn` | `pip install cognitive-modules` |
447
- | Node.js | `cogn` or `cognitive-modules-cli` | `cog` | `npm install -g cogn` or `npx cogn` |
463
+ | Python | `cognitive-modules` | `cog` | `pip install cognitive-modules` |
464
+ | Node.js | `cognitive-modules-cli` | `cog` | `npm install -g cognitive-modules-cli` |
448
465
 
449
466
  Both versions share the same module format and v2.2 specification.
450
467
 
@@ -1,7 +1,10 @@
1
1
  # Cognitive Modules
2
2
 
3
3
  [![CI](https://github.com/ziel-io/cognitive-modules/actions/workflows/ci.yml/badge.svg)](https://github.com/ziel-io/cognitive-modules/actions/workflows/ci.yml)
4
- [![PyPI version](https://badge.fury.io/py/cognitive-modules.svg)](https://pypi.org/project/cognitive-modules/)
4
+ [![npm version](https://img.shields.io/npm/v/cognitive-modules-cli.svg)](https://www.npmjs.com/package/cognitive-modules-cli)
5
+ [![PyPI version](https://img.shields.io/pypi/v/cognitive-modules.svg)](https://pypi.org/project/cognitive-modules/)
6
+ [![npm downloads](https://img.shields.io/npm/dm/cognitive-modules-cli.svg)](https://www.npmjs.com/package/cognitive-modules-cli)
7
+ [![Node.js 18+](https://img.shields.io/badge/node-18+-green.svg)](https://nodejs.org/)
5
8
  [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
6
9
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
10
 
@@ -30,7 +33,24 @@ Cognitive Modules is an AI task definition specification designed for generation
30
33
  - **Subagent Orchestration** - `@call:module` supports inter-module calls
31
34
  - **Parameter Passing** - `$ARGUMENTS` runtime substitution
32
35
  - **Multi-LLM Support** - OpenAI / Anthropic / MiniMax / Ollama
33
- - **Public Registry** - `cogn install registry:module-name`
36
+ - **Public Registry** - `cog install registry:module-name`
37
+
38
+ ## Version Selection
39
+
40
+ | Version | Spec | npm | PyPI | Status |
41
+ |---------|------|-----|------|--------|
42
+ | **v2.2** | v2.2 | `2.2.0` | `2.2.1` | ✅ Stable (recommended) |
43
+ | **v2.5** | v2.5 | `2.5.0-beta.x` | `2.5.0bx` | 🧪 Beta (streaming + multimodal) |
44
+
45
+ ```bash
46
+ # Install stable v2.2
47
+ npm install cognitive-modules-cli@2.2.0
48
+ pip install cognitive-modules==2.2.1
49
+
50
+ # Install beta v2.5 (streaming + multimodal)
51
+ npm install cognitive-modules-cli@beta
52
+ pip install cognitive-modules==2.5.0b1
53
+ ```
34
54
 
35
55
  ## Installation
36
56
 
@@ -38,30 +58,27 @@ Cognitive Modules is an AI task definition specification designed for generation
38
58
 
39
59
  ```bash
40
60
  # Zero-install quick start (recommended)
41
- npx cogn run code-reviewer --args "your code"
61
+ npx cognitive-modules-cli@2.2.0 run code-reviewer --args "your code"
42
62
 
43
63
  # Global installation
44
- npm install -g cogn
45
-
46
- # Or install with full package name
47
- npm install -g cognitive-modules-cli
64
+ npm install -g cognitive-modules-cli@2.2.0
48
65
  ```
49
66
 
50
67
  ### Python (pip)
51
68
 
52
69
  ```bash
53
- pip install cognitive-modules
70
+ pip install cognitive-modules==2.2.1
54
71
 
55
72
  # With LLM support
56
- pip install cognitive-modules[openai] # OpenAI
57
- pip install cognitive-modules[anthropic] # Claude
58
- pip install cognitive-modules[all] # All providers
73
+ pip install "cognitive-modules[openai]==2.2.1" # OpenAI
74
+ pip install "cognitive-modules[anthropic]==2.2.1" # Claude
75
+ pip install "cognitive-modules[all]==2.2.1" # All providers
59
76
  ```
60
77
 
61
78
  | Platform | Package | Command | Features |
62
79
  |----------|---------|---------|----------|
63
- | **npm** | `cogn` | `cog` | ✅ Recommended, zero-install, full features |
64
- | pip | `cognitive-modules` | `cogn` | ✅ Full features |
80
+ | **npm** | `cognitive-modules-cli` | `cog` | ✅ Recommended, zero-install, full features |
81
+ | pip | `cognitive-modules` | `cog` | ✅ Full features |
65
82
 
66
83
  ## Quick Start
67
84
 
@@ -71,7 +88,7 @@ export LLM_PROVIDER=openai
71
88
  export OPENAI_API_KEY=sk-xxx
72
89
 
73
90
  # Run code review (npm)
74
- npx cogn run code-reviewer --args "def login(u,p): return db.query(f'SELECT * FROM users WHERE name={u}')" --pretty
91
+ npx cognitive-modules-cli run code-reviewer --args "def login(u,p): return db.query(f'SELECT * FROM users WHERE name={u}')" --pretty
75
92
 
76
93
  # Or use globally installed cog command
77
94
  cog run code-reviewer --args "..." --pretty
@@ -137,70 +154,70 @@ All modules now return the unified v2.2 envelope format:
137
154
  | **Risk Aggregation** | `meta.risk = max(changes[*].risk)` |
138
155
  | **Parameter Passing** | `$ARGUMENTS` runtime substitution |
139
156
  | **Subagents** | `@call:module` for inter-module calls |
140
- | **Validation Tools** | `cogn validate` / `cogn validate --v22` |
157
+ | **Validation Tools** | `cog validate` / `cog validate --v22` |
141
158
 
142
159
  ## Integration Methods
143
160
 
144
161
  | Method | Command | Use Case |
145
162
  |--------|---------|----------|
146
- | CLI | `cogn run` | Command line |
147
- | HTTP API | `cogn serve` | n8n, Coze, Dify |
148
- | MCP Server | `cogn mcp` | Claude, Cursor |
163
+ | CLI | `cog run` | Command line |
164
+ | HTTP API | `cog serve` | n8n, Coze, Dify |
165
+ | MCP Server | `cog mcp` | Claude, Cursor |
149
166
 
150
167
  ## CLI Commands
151
168
 
152
169
  ```bash
153
170
  # Module management
154
- cogn list # List installed modules
155
- cogn info <module> # View module details
156
- cogn validate <module> # Validate module structure
157
- cogn validate <module> --v22 # Validate v2.2 format
171
+ cog list # List installed modules
172
+ cog info <module> # View module details
173
+ cog validate <module> # Validate module structure
174
+ cog validate <module> --v22 # Validate v2.2 format
158
175
 
159
176
  # Run modules
160
- cogn run <module> input.json -o output.json --pretty
161
- cogn run <module> --args "requirements" --pretty
162
- cogn run <module> --args "requirements" --subagent # Enable subagent
177
+ cog run <module> input.json -o output.json --pretty
178
+ cog run <module> --args "requirements" --pretty
179
+ cog run <module> --args "requirements" --subagent # Enable subagent
163
180
 
164
181
  # Create modules
165
- cogn init <name> -d "description"
166
- cogn init <name> --format v22 # Create v2.2 format module
182
+ cog init <name> -d "description"
183
+ cog init <name> --format v22 # Create v2.2 format module
167
184
 
168
185
  # Migrate modules
169
- cogn migrate <module> # Migrate v1/v2.1 module to v2.2
186
+ cog migrate <module> # Migrate v1/v2.1 module to v2.2
170
187
 
171
188
  # Install from GitHub (recommended)
172
- cogn add ziel-io/cognitive-modules -m code-simplifier
173
- cogn add org/repo -m module-name --tag v1.0.0 # Install specific version
174
- cogn remove <module> # Remove module
189
+ cog add ziel-io/cognitive-modules -m code-simplifier
190
+ cog add org/repo -m module-name --tag v1.0.0 # Install specific version
191
+ cog remove <module> # Remove module
175
192
 
176
193
  # Version management
177
- cogn update <module> # Update to latest version
178
- cogn update <module> --tag v2.0.0 # Update to specific version
179
- cogn versions <url> # View available versions
194
+ cog update <module> # Update to latest version
195
+ cog update <module> --tag v2.0.0 # Update to specific version
196
+ cog versions <url> # View available versions
180
197
 
181
198
  # Other installation methods
182
- cogn install github:user/repo/path
183
- cogn install registry:module-name
184
- cogn uninstall <module>
199
+ cog install github:user/repo/path
200
+ cog install registry:module-name
201
+ cog uninstall <module>
185
202
 
186
203
  # Registry
187
- cogn registry # View public modules
188
- cogn search <query> # Search modules
204
+ cog registry # View public modules
205
+ cog search <query> # Search modules
189
206
 
190
207
  # Environment check
191
- cogn doctor
208
+ cog doctor
192
209
  ```
193
210
 
194
211
  ## Built-in Modules
195
212
 
196
213
  | Module | Tier | Function | Example |
197
214
  |--------|------|----------|---------|
198
- | `code-reviewer` | decision | Code review | `cogn run code-reviewer --args "your code"` |
199
- | `code-simplifier` | decision | Code simplification | `cogn run code-simplifier --args "complex code"` |
200
- | `task-prioritizer` | decision | Task priority sorting | `cogn run task-prioritizer --args "task1,task2"` |
201
- | `api-designer` | decision | REST API design | `cogn run api-designer --args "order system"` |
202
- | `ui-spec-generator` | exploration | UI spec generation | `cogn run ui-spec-generator --args "e-commerce homepage"` |
203
- | `product-analyzer` | exploration | Product analysis (subagent) | `cogn run product-analyzer --args "health product" -s` |
215
+ | `code-reviewer` | decision | Code review | `cog run code-reviewer --args "your code"` |
216
+ | `code-simplifier` | decision | Code simplification | `cog run code-simplifier --args "complex code"` |
217
+ | `task-prioritizer` | decision | Task priority sorting | `cog run task-prioritizer --args "task1,task2"` |
218
+ | `api-designer` | decision | REST API design | `cog run api-designer --args "order system"` |
219
+ | `ui-spec-generator` | exploration | UI spec generation | `cog run ui-spec-generator --args "e-commerce homepage"` |
220
+ | `product-analyzer` | exploration | Product analysis (subagent) | `cog run product-analyzer --args "health product" -s` |
204
221
 
205
222
  ## Module Format
206
223
 
@@ -312,7 +329,7 @@ export MINIMAX_API_KEY=sk-xxx
312
329
  export LLM_PROVIDER=ollama
313
330
 
314
331
  # Check configuration
315
- cogn doctor
332
+ cog doctor
316
333
  ```
317
334
 
318
335
  ## Migrating to v2.2
@@ -321,13 +338,13 @@ Migrate from v1 or v2.1 modules to v2.2:
321
338
 
322
339
  ```bash
323
340
  # Auto-migrate single module
324
- cogn migrate code-reviewer
341
+ cog migrate code-reviewer
325
342
 
326
343
  # Migrate all modules
327
- cogn migrate --all
344
+ cog migrate --all
328
345
 
329
346
  # Verify migration result
330
- cogn validate code-reviewer --v22
347
+ cog validate code-reviewer --v22
331
348
  ```
332
349
 
333
350
  Manual migration steps:
@@ -350,8 +367,8 @@ pip install -e ".[dev]"
350
367
  pytest tests/ -v
351
368
 
352
369
  # Create new module (v2.2 format)
353
- cogn init my-module -d "module description" --format v22
354
- cogn validate my-module --v22
370
+ cog init my-module -d "module description" --format v22
371
+ cog validate my-module --v22
355
372
  ```
356
373
 
357
374
  ## Project Structure
@@ -385,8 +402,8 @@ cognitive-modules/
385
402
 
386
403
  | Platform | Package | Command | Installation |
387
404
  |----------|---------|---------|--------------|
388
- | Python | `cognitive-modules` | `cogn` | `pip install cognitive-modules` |
389
- | Node.js | `cogn` or `cognitive-modules-cli` | `cog` | `npm install -g cogn` or `npx cogn` |
405
+ | Python | `cognitive-modules` | `cog` | `pip install cognitive-modules` |
406
+ | Node.js | `cognitive-modules-cli` | `cog` | `npm install -g cognitive-modules-cli` |
390
407
 
391
408
  Both versions share the same module format and v2.2 specification.
392
409
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cognitive-modules"
7
- version = "2.2.0"
7
+ version = "2.2.2"
8
8
  description = "Structured LLM task runner with schema validation, confidence scoring, and subagent orchestration"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -76,7 +76,7 @@ docs = [
76
76
  ]
77
77
 
78
78
  [project.scripts]
79
- cogn = "cognitive.cli:app"
79
+ cog = "cognitive.cli:app"
80
80
 
81
81
  [project.urls]
82
82
  Homepage = "https://github.com/ziel-io/cognitive-modules"
@@ -184,16 +184,20 @@ def load_v2_format(module_path: Path) -> dict:
184
184
  "require_suggested_mapping": overflow_raw.get("require_suggested_mapping", True)
185
185
  }
186
186
 
187
- enums = manifest.get("enums", {
187
+ # Merge enums with defaults (ensure defaults are applied even if partial config exists)
188
+ enums_defaults = {
188
189
  "strategy": "extensible" if tier in ("decision", "exploration") else "strict",
189
190
  "unknown_tag": "custom"
190
- })
191
+ }
192
+ enums = {**enums_defaults, **manifest.get("enums", {})}
191
193
 
192
- compat = manifest.get("compat", {
194
+ # Merge compat with defaults (ensure defaults are applied even if partial config exists)
195
+ compat_defaults = {
193
196
  "accepts_v21_payload": True,
194
197
  "runtime_auto_wrap": True,
195
198
  "schema_output_alias": "data"
196
- })
199
+ }
200
+ compat = {**compat_defaults, **manifest.get("compat", {})}
197
201
 
198
202
  io_config = manifest.get("io", {})
199
203
  tests = manifest.get("tests", [])