vector-task-mcp 1.7.0__tar.gz → 1.7.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 (30) hide show
  1. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/PKG-INFO +1 -1
  2. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/pyproject.toml +1 -1
  3. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/src/CASES.md +150 -1
  4. vector_task_mcp-1.7.2/tests/test_cases_integrity.py +211 -0
  5. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/vector_task_mcp.egg-info/PKG-INFO +1 -1
  6. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/vector_task_mcp.egg-info/SOURCES.txt +1 -0
  7. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/.mcp.json +0 -0
  8. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/.python-version +0 -0
  9. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/CLAUDE.md +0 -0
  10. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/LICENSE +0 -0
  11. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/MANIFEST.in +0 -0
  12. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/README.md +0 -0
  13. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/claude-desktop-config.example.json +0 -0
  14. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/main.py +0 -0
  15. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/requirements.txt +0 -0
  16. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/run-arm64.sh +0 -0
  17. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/setup.cfg +0 -0
  18. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/src/README_AGENTS.md +0 -0
  19. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/src/__init__.py +0 -0
  20. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/src/embeddings.py +0 -0
  21. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/src/models.py +0 -0
  22. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/src/normalization.py +0 -0
  23. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/src/security.py +0 -0
  24. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/src/task_store.py +0 -0
  25. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/tests/test_normalization.py +0 -0
  26. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/tests/test_task_store.py +0 -0
  27. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/vector_task_mcp.egg-info/dependency_links.txt +0 -0
  28. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/vector_task_mcp.egg-info/entry_points.txt +0 -0
  29. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/vector_task_mcp.egg-info/requires.txt +0 -0
  30. {vector_task_mcp-1.7.0 → vector_task_mcp-1.7.2}/vector_task_mcp.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vector-task-mcp
3
- Version: 1.7.0
3
+ Version: 1.7.2
4
4
  Summary: A secure, vector-based task management server for Claude Desktop using sqlite-vec and sentence-transformers
5
5
  Author-email: Xsaven <xsaven@gmail.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "vector-task-mcp"
3
- version = "1.7.0"
3
+ version = "1.7.2"
4
4
  description = "A secure, vector-based task management server for Claude Desktop using sqlite-vec and sentence-transformers"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -2154,7 +2154,8 @@ mcp__vector-memory__store_memory(
2154
2154
 
2155
2155
  ---
2156
2156
 
2157
- ## Gates & Rules Scenarios
2157
+ ## Gates Rules Scenarios
2158
+ <!-- description: Critical gates and constitutional rules. WHEN to enforce, not HOW to implement. -->
2158
2159
 
2159
2160
  Critical rules and guardrails for task operations. Violations break system integrity.
2160
2161
 
@@ -2287,6 +2288,154 @@ VIOLATION: Analyze dependencies. Only mark parallel: true when independence conf
2287
2288
 
2288
2289
  ---
2289
2290
 
2291
+ ### Six Constitutional Gates
2292
+
2293
+ Six mandatory gates that protect system integrity. Each gate is a self-contained enforcement point.
2294
+
2295
+ ---
2296
+
2297
+ #### Gate 1: MCP-JSON-ONLY
2298
+
2299
+ ```
2300
+ RULE: ALL MCP calls MUST use JSON-RPC via MCP tools. NEVER direct database/file access.
2301
+ WHY: MCP ensures embedding generation, validation, and data integrity.
2302
+ TRIGGER: Any task/memory operation.
2303
+
2304
+ ENFORCEMENT:
2305
+ BEFORE: Verify using mcp__vector-task__* or mcp__vector-memory__*
2306
+ AFTER: If direct access detected → REJECT + escalate
2307
+
2308
+ BAD: sqlite3.connect('./memory/tasks.db')
2309
+ GOOD: mcp__vector-task__task_list({...})
2310
+ ```
2311
+
2312
+ ---
2313
+
2314
+ #### Gate 2: Lightweight Lawyer Gate
2315
+
2316
+ ```
2317
+ RULE: ALL proposals MUST pass 5-check verification before storage.
2318
+ WHY: Prevents low-quality proposals from polluting memory.
2319
+ TRIGGER: Self-improvement proposals, instruction changes.
2320
+
2321
+ CHECKLIST:
2322
+ 1. Iron Rules: Does NOT violate any → PASS
2323
+ 2. Measurable: Has specific metric → PASS
2324
+ 3. Reversible: Has rollback plan → PASS
2325
+ 4. Scope: Does NOT expand task → PASS
2326
+ 5. Security: Does NOT weaken (or improves) → PASS
2327
+
2328
+ ENFORCEMENT:
2329
+ IF 5/5 PASS → Store proposal
2330
+ IF security/iron_rules/scope FAIL → REJECT
2331
+ ELSE → CLARIFY
2332
+
2333
+ See: "Lightweight Lawyer Gate Scenarios" section for full details.
2334
+ ```
2335
+
2336
+ ---
2337
+
2338
+ #### Gate 3: Constitutional Learn Protocol
2339
+
2340
+ ```
2341
+ RULE: ALL failures with trigger signals MUST store lessons to memory.
2342
+ WHY: Captures failure patterns for future prevention.
2343
+ TRIGGER: retries > 0, stuck tag, validation-fix, blocked, user correction.
2344
+
2345
+ STEPS:
2346
+ 1. Detect trigger signal in task
2347
+ 2. Search memory for duplicates
2348
+ 3. IF unique → Store with format:
2349
+ FAILURE: {what}
2350
+ ROOT CAUSE: {why}
2351
+ FIX: {how}
2352
+ PREVENTION: {pattern}
2353
+ CONTEXT: Task #{id}
2354
+ 4. Link memory ID in task comment
2355
+
2356
+ ENFORCEMENT:
2357
+ AFTER task completion: IF trigger detected AND no lesson stored → ESCALATE
2358
+
2359
+ See: "Constitutional Learn Protocol Scenarios" section for full details.
2360
+ ```
2361
+
2362
+ ---
2363
+
2364
+ #### Gate 4: Category Discipline Contract
2365
+
2366
+ ```
2367
+ RULE: Categories are FIXED. NEVER create new categories dynamically.
2368
+ WHY: Prevents category drift and search fragmentation.
2369
+ TRIGGER: Any memory/task storage.
2370
+
2371
+ ALLOWED CATEGORIES (Task MCP):
2372
+ (None - tasks use tags only)
2373
+
2374
+ ALLOWED CATEGORIES (Memory MCP):
2375
+ code-solution, bug-fix, architecture, learning, debugging,
2376
+ performance, security, project-context, other
2377
+
2378
+ ENFORCEMENT:
2379
+ BEFORE storage: IF category not in allowed list → REJECT
2380
+ AFTER storage: IF category mismatch detected → DELETE + re-store
2381
+
2382
+ BAD: store_memory({category: "new-feature", ...})
2383
+ GOOD: store_memory({category: "code-solution", ...})
2384
+ ```
2385
+
2386
+ ---
2387
+
2388
+ #### Gate 5: Cookbook-First Gate
2389
+
2390
+ ```
2391
+ RULE: When uncertain, CALL cookbook() BEFORE assuming or searching elsewhere.
2392
+ WHY: Cookbook contains authoritative patterns, tools, and best practices.
2393
+ TRIGGER: Uncertainty about tools, patterns, rules, or procedures.
2394
+
2395
+ STEPS:
2396
+ 1. IF uncertain → mcp__vector-task__cookbook() or mcp__vector-memory__cookbook()
2397
+ 2. IF answer found → Apply pattern
2398
+ 3. IF not found → THEN search memory/docs/web
2399
+
2400
+ ENFORCEMENT:
2401
+ IF question answered by cookbook BUT not called first → WARN
2402
+ IF repeated violations → ESCALATE
2403
+
2404
+ PRIORITY ORDER:
2405
+ 1. cookbook() - authoritative
2406
+ 2. vector memory - context-specific
2407
+ 3. external docs - supplementary
2408
+ ```
2409
+
2410
+ ---
2411
+
2412
+ #### Gate 6: Failure Escalation Gate
2413
+
2414
+ ```
2415
+ RULE: Failures MUST escalate according to severity. NEVER silently continue.
2416
+ WHY: Prevents error cascades and ensures visibility.
2417
+ TRIGGER: Any failure, error, or unexpected state.
2418
+
2419
+ ESCALATION LEVELS:
2420
+
2421
+ | Severity | Condition | Action |
2422
+ |----------|-----------|--------|
2423
+ | CRITICAL | Data loss risk, security breach | STOP + ALERT human immediately |
2424
+ | HIGH | System integrity at risk | STOP + Log + Store lesson |
2425
+ | MEDIUM | Task failure, retry possible | RETRY (max 3) + Store lesson |
2426
+ | LOW | Minor issue, workaround exists | LOG + Continue |
2427
+
2428
+ ENFORCEMENT:
2429
+ IF CRITICAL failure AND continued → SEVERE VIOLATION
2430
+ IF retries > 3 AND no escalation → VIOLATION
2431
+ IF lesson stored but no retry/escalation → INCOMPLETE
2432
+
2433
+ ESCALATION PATH:
2434
+ Agent → Brain → Human (CRITICAL only)
2435
+ ```
2436
+
2437
+ ---
2438
+
2290
2439
  ### Cross-Reference with Memory MCP Rules
2291
2440
 
2292
2441
  | Task Rule | Memory Rule | Coordination |
@@ -0,0 +1,211 @@
1
+ """
2
+ Test CASES.md integrity: all categories must have description and content.
3
+
4
+ Run: pytest tests/test_cases_integrity.py -v
5
+
6
+ This test ensures:
7
+ 1. All categories have non-empty description in <!-- description: ... -->
8
+ 2. All categories have actual content (not empty when queried)
9
+ 3. Category naming follows conventions
10
+ """
11
+
12
+ import re
13
+ import pytest
14
+ from pathlib import Path
15
+
16
+
17
+ CASES_FILE = Path(__file__).parent.parent / "src" / "CASES.md"
18
+
19
+
20
+ def parse_categories_from_cases():
21
+ """Parse all category headers with their descriptions from CASES.md"""
22
+ content = CASES_FILE.read_text()
23
+
24
+ # Pattern: ## Name Scenarios (optional) followed by optional <!-- description: ... -->
25
+ pattern = r'^## (.+?)(?: Scenarios)?(?: \([A-Z]+\))?\n(?:<!-- description: (.+?) -->)?'
26
+ matches = re.findall(pattern, content, re.MULTILINE)
27
+
28
+ categories = []
29
+ for name, description in matches:
30
+ # Convert name to key: "Gates & Rules" -> "gates-rules"
31
+ key = name.lower()
32
+ key = re.sub(r'[&()]', '', key)
33
+ key = re.sub(r'\s+', '-', key)
34
+ key = re.sub(r'-+', '-', key).strip('-')
35
+
36
+ categories.append({
37
+ "name": name,
38
+ "key": key,
39
+ "description": description.strip() if description else ""
40
+ })
41
+
42
+ return categories
43
+
44
+
45
+ def get_expected_categories():
46
+ """Expected categories based on cookbook API"""
47
+ return [
48
+ "essential-patterns",
49
+ "task-decision",
50
+ "task-creation",
51
+ "task-execution",
52
+ "search-query",
53
+ "tag-normalization",
54
+ "hierarchy-decomposition",
55
+ "status-time-tracking",
56
+ "error-handling-recovery",
57
+ "parallel-execution",
58
+ "validation",
59
+ "tag-intelligence",
60
+ "debug-developer",
61
+ "tag-selection",
62
+ "statistics-reporting",
63
+ "brainstorm-ideation",
64
+ "multi-probe-search",
65
+ "comment-context",
66
+ "memory-integration",
67
+ "gates-rules",
68
+ "cookbook-usage",
69
+ "garbage-collection-cleanup",
70
+ "anti-pattern-examples",
71
+ "technical-debt-management",
72
+ "constitutional-learn-protocol",
73
+ "self-improvement",
74
+ "lightweight-lawyer-gate",
75
+ "standard-search-patterns-quick-reference",
76
+ "tag-taxonomy-quick-reference",
77
+ ]
78
+
79
+
80
+ class TestCasesIntegrity:
81
+ """Test suite for CASES.md integrity"""
82
+
83
+ def test_cases_file_exists(self):
84
+ """CASES.md must exist"""
85
+ assert CASES_FILE.exists(), f"CASES.md not found at {CASES_FILE}"
86
+
87
+ def test_all_categories_have_description(self):
88
+ """All categories must have non-empty description"""
89
+ categories = parse_categories_from_cases()
90
+
91
+ missing_descriptions = []
92
+ for cat in categories:
93
+ if not cat["description"]:
94
+ missing_descriptions.append(cat["key"])
95
+
96
+ assert not missing_descriptions, (
97
+ f"Categories missing description:\n"
98
+ + "\n".join(f" - {k}" for k in missing_descriptions)
99
+ + "\n\nFix: Add <!-- description: Your description here --> after the ## header"
100
+ )
101
+
102
+ def test_expected_categories_exist(self):
103
+ """All expected categories must be present in CASES.md"""
104
+ categories = parse_categories_from_cases()
105
+ found_keys = {cat["key"] for cat in categories}
106
+ expected_keys = set(get_expected_categories())
107
+
108
+ missing = expected_keys - found_keys
109
+ extra = found_keys - expected_keys
110
+
111
+ error_parts = []
112
+ if missing:
113
+ error_parts.append(f"Missing categories:\n" + "\n".join(f" - {k}" for k in sorted(missing)))
114
+ if extra:
115
+ error_parts.append(f"Unexpected categories:\n" + "\n".join(f" - {k}" for k in sorted(extra)))
116
+
117
+ assert not missing and not extra, "\n\n".join(error_parts)
118
+
119
+ def test_category_key_format(self):
120
+ """Category keys must follow lowercase-with-dashes format"""
121
+ categories = parse_categories_from_cases()
122
+
123
+ invalid_keys = []
124
+ for cat in categories:
125
+ # Should be lowercase, dashes only, no double dashes
126
+ if not re.match(r'^[a-z0-9]+(-[a-z0-9]+)*$', cat["key"]):
127
+ invalid_keys.append(f"{cat['name']} -> {cat['key']}")
128
+
129
+ assert not invalid_keys, (
130
+ f"Invalid category key formats:\n"
131
+ + "\n".join(f" - {k}" for k in invalid_keys)
132
+ + "\n\nKeys must be lowercase with single dashes: 'gates-rules', not 'Gates & Rules'"
133
+ )
134
+
135
+ def test_description_quality(self):
136
+ """Descriptions should be meaningful (not too short, not placeholder)"""
137
+ categories = parse_categories_from_cases()
138
+
139
+ weak_descriptions = []
140
+ for cat in categories:
141
+ desc = cat["description"]
142
+ # Check for placeholder-like descriptions
143
+ if desc.lower() in ["", "todo", "tbd", "n/a", "none"]:
144
+ weak_descriptions.append(f"{cat['key']}: '{desc}' (empty/placeholder)")
145
+ elif len(desc) < 20:
146
+ weak_descriptions.append(f"{cat['key']}: '{desc}' (too short, min 20 chars)")
147
+
148
+ assert not weak_descriptions, (
149
+ f"Weak descriptions found:\n"
150
+ + "\n".join(f" - {d}" for d in weak_descriptions)
151
+ + "\n\nDescriptions should be informative and at least 20 characters"
152
+ )
153
+
154
+ def test_gates_rules_has_content(self):
155
+ """gates-rules category must have 6 constitutional gates"""
156
+ content = CASES_FILE.read_text()
157
+
158
+ gates_match = re.search(
159
+ r'^## Gates.*?Rules.*?(?=^## |\Z)',
160
+ content,
161
+ re.MULTILINE | re.DOTALL
162
+ )
163
+
164
+ assert gates_match, "gates-rules section not found in CASES.md"
165
+
166
+ gates_content = gates_match.group(0)
167
+
168
+ required_gates = [
169
+ "Gate 1: MCP-JSON-ONLY",
170
+ "Gate 2: Lightweight Lawyer Gate",
171
+ "Gate 3: Constitutional Learn Protocol",
172
+ "Gate 4: Category Discipline Contract",
173
+ "Gate 5: Cookbook-First Gate",
174
+ "Gate 6: Failure Escalation Gate"
175
+ ]
176
+
177
+ missing_gates = []
178
+ for gate in required_gates:
179
+ if gate.lower() not in gates_content.lower():
180
+ missing_gates.append(gate)
181
+
182
+ assert not missing_gates, (
183
+ f"gates-rules missing required gates:\n"
184
+ + "\n".join(f" - {g}" for g in missing_gates)
185
+ )
186
+
187
+ assert "[CRITICAL]" in gates_content, "gates-rules must contain CRITICAL priority rules"
188
+ assert "[HIGH]" in gates_content, "gates-rules must contain HIGH priority rules"
189
+
190
+
191
+ # CLI helper to show current status
192
+ if __name__ == "__main__":
193
+ print("=== CASES.md Integrity Check ===\n")
194
+
195
+ categories = parse_categories_from_cases()
196
+ expected = set(get_expected_categories())
197
+
198
+ print("Categories with descriptions:\n")
199
+ for cat in categories:
200
+ status = "✓" if cat["description"] else "✗ MISSING"
201
+ print(f" {status} {cat['key']}")
202
+ if cat["description"]:
203
+ print(f" {cat['description'][:60]}{'...' if len(cat['description']) > 60 else ''}")
204
+
205
+ print(f"\nTotal: {len(categories)} categories")
206
+ print(f"Missing descriptions: {sum(1 for c in categories if not c['description'])}")
207
+
208
+ found_keys = {cat["key"] for cat in categories}
209
+ missing = expected - found_keys
210
+ if missing:
211
+ print(f"\nMissing categories: {missing}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vector-task-mcp
3
- Version: 1.7.0
3
+ Version: 1.7.2
4
4
  Summary: A secure, vector-based task management server for Claude Desktop using sqlite-vec and sentence-transformers
5
5
  Author-email: Xsaven <xsaven@gmail.com>
6
6
  License-Expression: MIT
@@ -17,6 +17,7 @@ src/models.py
17
17
  src/normalization.py
18
18
  src/security.py
19
19
  src/task_store.py
20
+ tests/test_cases_integrity.py
20
21
  tests/test_normalization.py
21
22
  tests/test_task_store.py
22
23
  vector_task_mcp.egg-info/PKG-INFO
File without changes
File without changes