mapify-cli 1.6.0__tar.gz → 1.6.1__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.
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/.gitignore +2 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/PKG-INFO +1 -1
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/pyproject.toml +1 -1
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/__init__.py +43 -1
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/playbook_manager.py +29 -6
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/recitation_manager.py +2 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/relationship_detector.py +1 -1
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/schemas.py +1 -1
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/agents/curator.md +1 -1
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/skills/map-cli-reference/SKILL.md +2 -2
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/.claude/hooks/README.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/.claude/skills/README.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/README.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/docs/cipher-setup-guide/README.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/contradiction_detector.py +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/entity_extractor.py +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/graph_query.py +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/playbook_query.py +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/semantic_search.py +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/agents/actor.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/agents/documentation-reviewer.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/agents/evaluator.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/agents/monitor.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/agents/predictor.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/agents/reflector.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/agents/task-decomposer.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/commands/map-debug.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/commands/map-efficient.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/commands/map-fast.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/commands/map-feature.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/commands/map-refactor.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/commands/map-review.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/README.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/helpers/__init__.py +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/helpers/inject_playbook_bullets.py +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/helpers/quality_gates.py +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/helpers/suggest_skill.py +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/helpers/suggest_workflow.py +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/helpers/validate_checkpoint_file.py +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/improve-prompt.py +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/session-start.sh +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/settings.json +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/stop.sh +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/tests/test_auto_activation.sh +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/user-prompt-submit.sh +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/validate-agent-templates.sh +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/settings.hooks.json +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/skills/README.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/skills/map-workflows-guide/SKILL.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/skills/map-workflows-guide/resources/agent-architecture.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/skills/map-workflows-guide/resources/cipher-integration.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/skills/map-workflows-guide/resources/map-debug-deep-dive.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/skills/map-workflows-guide/resources/map-efficient-deep-dive.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/skills/map-workflows-guide/resources/map-fast-deep-dive.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/skills/map-workflows-guide/resources/map-feature-deep-dive.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/skills/map-workflows-guide/resources/map-refactor-deep-dive.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/skills/map-workflows-guide/resources/playbook-system.md +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/skills/skill-rules.json +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/workflow-rules.json +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/tools/__init__.py +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/tools/validate_dependencies.py +0 -0
- {mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/workflow_logger.py +0 -0
|
@@ -37,8 +37,10 @@ htmlcov/
|
|
|
37
37
|
|
|
38
38
|
# ACE Playbook - user-specific data
|
|
39
39
|
.claude/embeddings_cache/
|
|
40
|
+
# LEGACY: playbook.json entries for migration support (ignore old format files)
|
|
40
41
|
.claude/playbook.json
|
|
41
42
|
.claude/playbook.json.backup.*
|
|
43
|
+
# Current format: SQLite database
|
|
42
44
|
.claude/playbook.db
|
|
43
45
|
.claude/playbook.db-shm
|
|
44
46
|
.claude/playbook.db-wal
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mapify-cli
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.1
|
|
4
4
|
Summary: MAP Framework installer - Modular Agentic Planner for Claude Code
|
|
5
5
|
Project-URL: Homepage, https://github.com/azalio/map-framework
|
|
6
6
|
Project-URL: Repository, https://github.com/azalio/map-framework.git
|
|
@@ -23,7 +23,7 @@ Or install globally:
|
|
|
23
23
|
mapify check
|
|
24
24
|
"""
|
|
25
25
|
|
|
26
|
-
__version__ = "1.6.
|
|
26
|
+
__version__ = "1.6.1"
|
|
27
27
|
|
|
28
28
|
import os
|
|
29
29
|
import subprocess
|
|
@@ -2046,6 +2046,48 @@ def init(
|
|
|
2046
2046
|
from mapify_cli.playbook_manager import PlaybookManager
|
|
2047
2047
|
|
|
2048
2048
|
playbook_db_path = project_path / ".claude" / "playbook.db"
|
|
2049
|
+
playbook_json_path = project_path / ".claude" / "playbook.json"
|
|
2050
|
+
|
|
2051
|
+
# When --force is used and playbook.json exists, handle migration scenarios
|
|
2052
|
+
if force and playbook_json_path.exists() and playbook_db_path.exists():
|
|
2053
|
+
# Check if the existing DB has valid schema (requires both bullets and metadata tables)
|
|
2054
|
+
db_is_valid = False
|
|
2055
|
+
try:
|
|
2056
|
+
test_conn = sqlite3.connect(str(playbook_db_path))
|
|
2057
|
+
cursor = test_conn.cursor()
|
|
2058
|
+
# Check for required tables
|
|
2059
|
+
cursor.execute(
|
|
2060
|
+
"SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name IN ('bullets', 'metadata')"
|
|
2061
|
+
)
|
|
2062
|
+
table_count = cursor.fetchone()[0]
|
|
2063
|
+
test_conn.close()
|
|
2064
|
+
db_is_valid = table_count == 2 # Both tables must exist
|
|
2065
|
+
except sqlite3.Error:
|
|
2066
|
+
db_is_valid = False
|
|
2067
|
+
|
|
2068
|
+
if not db_is_valid:
|
|
2069
|
+
# DB is missing required schema or corrupted - remove it to allow migration
|
|
2070
|
+
try:
|
|
2071
|
+
playbook_db_path.unlink()
|
|
2072
|
+
console.print(
|
|
2073
|
+
"[yellow]Removing incomplete playbook.db to migrate from playbook.json[/yellow]"
|
|
2074
|
+
)
|
|
2075
|
+
except OSError:
|
|
2076
|
+
pass # If we can't remove it, let PlaybookManager handle the error
|
|
2077
|
+
else:
|
|
2078
|
+
# DB is valid but playbook.json also exists - remove stale JSON to avoid confusion
|
|
2079
|
+
# Create backup first in case user needs it
|
|
2080
|
+
backup_path = str(playbook_json_path) + ".stale"
|
|
2081
|
+
try:
|
|
2082
|
+
import shutil
|
|
2083
|
+
|
|
2084
|
+
shutil.move(str(playbook_json_path), backup_path)
|
|
2085
|
+
console.print(
|
|
2086
|
+
f"[yellow]Moved stale playbook.json to {backup_path} (valid playbook.db already exists)[/yellow]"
|
|
2087
|
+
)
|
|
2088
|
+
except OSError:
|
|
2089
|
+
pass # If we can't move it, it's not critical
|
|
2090
|
+
|
|
2049
2091
|
manager = PlaybookManager(
|
|
2050
2092
|
db_path=str(playbook_db_path), use_semantic_search=False
|
|
2051
2093
|
)
|
|
@@ -81,9 +81,11 @@ class PlaybookManager:
|
|
|
81
81
|
self.db_path = Path(".claude/playbook.db")
|
|
82
82
|
else:
|
|
83
83
|
self.db_path = Path(db_path)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
# LEGACY: playbook.json path for migration support only.
|
|
85
|
+
# This allows users upgrading from older versions to have their
|
|
86
|
+
# playbook.json automatically migrated to playbook.db.
|
|
87
|
+
# DO NOT use playbook_path for new functionality.
|
|
88
|
+
self.playbook_path = self.db_path.parent / "playbook.json"
|
|
87
89
|
|
|
88
90
|
# Check if DB exists, if not but JSON exists → migrate
|
|
89
91
|
if not self.db_path.exists() and self.playbook_path.exists():
|
|
@@ -449,10 +451,17 @@ class PlaybookManager:
|
|
|
449
451
|
|
|
450
452
|
def _migrate_json_to_sqlite(self) -> None:
|
|
451
453
|
"""
|
|
452
|
-
Migrate existing playbook.json to SQLite database.
|
|
454
|
+
LEGACY MIGRATION: Migrate existing playbook.json to SQLite database.
|
|
455
|
+
|
|
456
|
+
This method is intentionally preserved for backward compatibility.
|
|
457
|
+
It allows users upgrading from MAP Framework versions < 2.2 to have
|
|
458
|
+
their playbook.json automatically migrated to the new playbook.db format.
|
|
459
|
+
|
|
460
|
+
The references to playbook.json in this method are intentional and
|
|
461
|
+
should NOT be removed - they are part of the migration logic.
|
|
453
462
|
|
|
454
463
|
Steps:
|
|
455
|
-
1. Load playbook.json
|
|
464
|
+
1. Load legacy playbook.json
|
|
456
465
|
2. Create SQLite schema
|
|
457
466
|
3. Insert all bullets into bullets table
|
|
458
467
|
4. Insert metadata
|
|
@@ -565,7 +574,7 @@ class PlaybookManager:
|
|
|
565
574
|
|
|
566
575
|
conn.close()
|
|
567
576
|
|
|
568
|
-
# Create backup of JSON
|
|
577
|
+
# Create backup of JSON and remove original
|
|
569
578
|
backup_path = (
|
|
570
579
|
str(self.playbook_path)
|
|
571
580
|
+ f".backup.{datetime.now(timezone.utc).strftime('%Y%m%d_%H%M%S')}"
|
|
@@ -578,6 +587,20 @@ class PlaybookManager:
|
|
|
578
587
|
)
|
|
579
588
|
print(f"✅ JSON backup saved to {backup_path}", file=sys.stderr)
|
|
580
589
|
|
|
590
|
+
# Remove original playbook.json to avoid confusion
|
|
591
|
+
# The backup is always available if needed
|
|
592
|
+
try:
|
|
593
|
+
self.playbook_path.unlink()
|
|
594
|
+
print(
|
|
595
|
+
f"✅ Removed {self.playbook_path} (backup preserved)",
|
|
596
|
+
file=sys.stderr,
|
|
597
|
+
)
|
|
598
|
+
except OSError as e:
|
|
599
|
+
print(
|
|
600
|
+
f"⚠️ Could not remove {self.playbook_path}: {e}",
|
|
601
|
+
file=sys.stderr,
|
|
602
|
+
)
|
|
603
|
+
|
|
581
604
|
def _load_playbook_from_db(self) -> Dict:
|
|
582
605
|
"""Load playbook structure from SQLite database for backward compatibility."""
|
|
583
606
|
cursor = self.db_conn.cursor()
|
|
@@ -586,6 +586,8 @@ class RecitationManager:
|
|
|
586
586
|
from mapify_cli.playbook_manager import PlaybookManager
|
|
587
587
|
|
|
588
588
|
playbook_db_path = self.project_root / ".claude" / "playbook.db"
|
|
589
|
+
# LEGACY: playbook_json_path is only used for backward compatibility
|
|
590
|
+
# to support migration from older versions. DO NOT use for new functionality.
|
|
589
591
|
playbook_json_path = self.project_root / ".claude" / "playbook.json"
|
|
590
592
|
|
|
591
593
|
# Check if playbook exists (prefer .db, fall back to .json for backward compatibility)
|
|
@@ -29,7 +29,7 @@ class RelationshipType(Enum):
|
|
|
29
29
|
USES = "USES" # A uses B (pytest USES Python)
|
|
30
30
|
DEPENDS_ON = "DEPENDS_ON" # A depends on B (MAP-workflow DEPENDS_ON playbook.db)
|
|
31
31
|
CONTRADICTS = "CONTRADICTS" # A contradicts B (generic-exception CONTRADICTS specific-exceptions)
|
|
32
|
-
SUPERSEDES = "SUPERSEDES" # A replaces B (
|
|
32
|
+
SUPERSEDES = "SUPERSEDES" # A replaces B (SQLite SUPERSEDES JSON-storage)
|
|
33
33
|
RELATED_TO = "RELATED_TO" # Generic relationship (fallback)
|
|
34
34
|
|
|
35
35
|
# Bonus 4 types (for comprehensive graph)
|
|
@@ -98,7 +98,7 @@ CREATE TABLE IF NOT EXISTS relationships (
|
|
|
98
98
|
'USES', -- Entity A uses Entity B (e.g., 'pytest' USES 'Python')
|
|
99
99
|
'DEPENDS_ON', -- A depends on B (e.g., 'MAP-workflow' DEPENDS_ON 'playbook.db')
|
|
100
100
|
'CONTRADICTS', -- A contradicts B (e.g., 'generic-exception' CONTRADICTS 'specific-exceptions')
|
|
101
|
-
'SUPERSEDES', -- A replaces B (e.g., '
|
|
101
|
+
'SUPERSEDES', -- A replaces B (e.g., 'SQLite' SUPERSEDES 'JSON-storage')
|
|
102
102
|
'RELATED_TO', -- Generic relationship (fallback)
|
|
103
103
|
'IMPLEMENTS', -- A implements pattern B (e.g., 'retry-logic' IMPLEMENTS 'resilience-pattern')
|
|
104
104
|
'CAUSES', -- A causes B (e.g., 'race-condition' CAUSES 'data-corruption')
|
|
@@ -339,7 +339,7 @@ mapify playbook apply-delta operations.json --dry-run
|
|
|
339
339
|
- ❌ `sqlite3 .claude/playbook.db "UPDATE bullets SET..."` → Direct SQL bypasses validation
|
|
340
340
|
- ❌ `Edit(.claude/playbook.db, ...)` → Cannot edit binary database
|
|
341
341
|
- ❌ Using "op" field → ✅ Correct field name is "type"
|
|
342
|
-
- ❌
|
|
342
|
+
- ❌ Using legacy JSON format → ✅ Use playbook.db (SQLite)
|
|
343
343
|
|
|
344
344
|
**Why apply-delta is mandatory**:
|
|
345
345
|
- Validates operations before applying
|
{mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/skills/map-cli-reference/SKILL.md
RENAMED
|
@@ -124,9 +124,9 @@ mapify upgrade
|
|
|
124
124
|
✅ **CORRECT**: `mapify playbook apply-delta operations.json`
|
|
125
125
|
📝 **Explanation**: Cannot edit binary SQLite database. Generate delta operations JSON and apply via CLI.
|
|
126
126
|
|
|
127
|
-
❌ **WRONG**:
|
|
127
|
+
❌ **WRONG**: Using legacy JSON format for playbook
|
|
128
128
|
✅ **CORRECT**: `mapify playbook query "..."`
|
|
129
|
-
📝 **Explanation**:
|
|
129
|
+
📝 **Explanation**: Playbook uses SQLite database (`playbook.db`). Use CLI commands to interact with playbook.
|
|
130
130
|
|
|
131
131
|
---
|
|
132
132
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/agents/documentation-reviewer.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/helpers/quality_gates.py
RENAMED
|
File without changes
|
{mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/helpers/suggest_skill.py
RENAMED
|
File without changes
|
{mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/helpers/suggest_workflow.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/tests/test_auto_activation.sh
RENAMED
|
File without changes
|
|
File without changes
|
{mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/hooks/validate-agent-templates.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mapify_cli-1.6.0 → mapify_cli-1.6.1}/src/mapify_cli/templates/skills/map-workflows-guide/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|