cartographing-kittens 0.1.0__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 (109) hide show
  1. cartographing_kittens-0.1.0/.claude-plugin/marketplace.json +33 -0
  2. cartographing_kittens-0.1.0/.copier-answers.yml +9 -0
  3. cartographing_kittens-0.1.0/.github/workflows/ci.yml +96 -0
  4. cartographing_kittens-0.1.0/.github/workflows/publish.yml +43 -0
  5. cartographing_kittens-0.1.0/.gitignore +35 -0
  6. cartographing_kittens-0.1.0/.pre-commit-config.yaml +23 -0
  7. cartographing_kittens-0.1.0/.python-version +1 -0
  8. cartographing_kittens-0.1.0/CLAUDE.md +158 -0
  9. cartographing_kittens-0.1.0/LICENSE +21 -0
  10. cartographing_kittens-0.1.0/PKG-INFO +301 -0
  11. cartographing_kittens-0.1.0/README.md +275 -0
  12. cartographing_kittens-0.1.0/plugins/cartograph/.claude-plugin/plugin.json +32 -0
  13. cartographing_kittens-0.1.0/plugins/cartograph/agents/cartograph-annotator.md +66 -0
  14. cartographing_kittens-0.1.0/plugins/cartograph/agents/cartograph-correctness-reviewer.md +59 -0
  15. cartographing_kittens-0.1.0/plugins/cartograph/agents/cartograph-flow-analyzer.md +41 -0
  16. cartographing_kittens-0.1.0/plugins/cartograph/agents/cartograph-impact-analyst.md +46 -0
  17. cartographing_kittens-0.1.0/plugins/cartograph/agents/cartograph-impact-reviewer.md +53 -0
  18. cartographing_kittens-0.1.0/plugins/cartograph/agents/cartograph-pattern-analyst.md +39 -0
  19. cartographing_kittens-0.1.0/plugins/cartograph/agents/cartograph-researcher.md +41 -0
  20. cartographing_kittens-0.1.0/plugins/cartograph/agents/cartograph-structure-reviewer.md +53 -0
  21. cartographing_kittens-0.1.0/plugins/cartograph/agents/cartograph-testing-reviewer.md +53 -0
  22. cartographing_kittens-0.1.0/plugins/cartograph/skills/cartograph/SKILL.md +104 -0
  23. cartographing_kittens-0.1.0/plugins/cartograph/skills/cartograph/references/annotation-workflow.md +90 -0
  24. cartographing_kittens-0.1.0/plugins/cartograph/skills/cartograph/references/tool-reference.md +321 -0
  25. cartographing_kittens-0.1.0/plugins/cartograph/skills/cartograph-annotate/SKILL.md +90 -0
  26. cartographing_kittens-0.1.0/plugins/cartograph/skills/cartograph-brainstorm/SKILL.md +103 -0
  27. cartographing_kittens-0.1.0/plugins/cartograph/skills/cartograph-explore/SKILL.md +61 -0
  28. cartographing_kittens-0.1.0/plugins/cartograph/skills/cartograph-impact/SKILL.md +70 -0
  29. cartographing_kittens-0.1.0/plugins/cartograph/skills/cartograph-lfg/SKILL.md +31 -0
  30. cartographing_kittens-0.1.0/plugins/cartograph/skills/cartograph-plan/SKILL.md +114 -0
  31. cartographing_kittens-0.1.0/plugins/cartograph/skills/cartograph-review/SKILL.md +115 -0
  32. cartographing_kittens-0.1.0/plugins/cartograph/skills/cartograph-work/SKILL.md +109 -0
  33. cartographing_kittens-0.1.0/pyproject.toml +183 -0
  34. cartographing_kittens-0.1.0/src/cartograph/__init__.py +3 -0
  35. cartographing_kittens-0.1.0/src/cartograph/annotation/__init__.py +23 -0
  36. cartographing_kittens-0.1.0/src/cartograph/annotation/annotator.py +352 -0
  37. cartographing_kittens-0.1.0/src/cartograph/indexing/__init__.py +18 -0
  38. cartographing_kittens-0.1.0/src/cartograph/indexing/discovery.py +223 -0
  39. cartographing_kittens-0.1.0/src/cartograph/indexing/indexer.py +503 -0
  40. cartographing_kittens-0.1.0/src/cartograph/parsing/__init__.py +21 -0
  41. cartographing_kittens-0.1.0/src/cartograph/parsing/extractors.py +648 -0
  42. cartographing_kittens-0.1.0/src/cartograph/parsing/queries.py +114 -0
  43. cartographing_kittens-0.1.0/src/cartograph/parsing/registry.py +71 -0
  44. cartographing_kittens-0.1.0/src/cartograph/py.typed +0 -0
  45. cartographing_kittens-0.1.0/src/cartograph/server/__init__.py +1 -0
  46. cartographing_kittens-0.1.0/src/cartograph/server/main.py +65 -0
  47. cartographing_kittens-0.1.0/src/cartograph/server/prompts/__init__.py +1 -0
  48. cartographing_kittens-0.1.0/src/cartograph/server/prompts/annotate.py +29 -0
  49. cartographing_kittens-0.1.0/src/cartograph/server/prompts/explore.py +38 -0
  50. cartographing_kittens-0.1.0/src/cartograph/server/prompts/refactor.py +31 -0
  51. cartographing_kittens-0.1.0/src/cartograph/server/tools/__init__.py +1 -0
  52. cartographing_kittens-0.1.0/src/cartograph/server/tools/analysis.py +91 -0
  53. cartographing_kittens-0.1.0/src/cartograph/server/tools/annotate.py +99 -0
  54. cartographing_kittens-0.1.0/src/cartograph/server/tools/index.py +58 -0
  55. cartographing_kittens-0.1.0/src/cartograph/server/tools/query.py +124 -0
  56. cartographing_kittens-0.1.0/src/cartograph/storage/__init__.py +6 -0
  57. cartographing_kittens-0.1.0/src/cartograph/storage/connection.py +32 -0
  58. cartographing_kittens-0.1.0/src/cartograph/storage/graph_store.py +389 -0
  59. cartographing_kittens-0.1.0/src/cartograph/storage/schema.py +67 -0
  60. cartographing_kittens-0.1.0/tests/__init__.py +0 -0
  61. cartographing_kittens-0.1.0/tests/benchmarks/__init__.py +1 -0
  62. cartographing_kittens-0.1.0/tests/benchmarks/test_performance.py +120 -0
  63. cartographing_kittens-0.1.0/tests/conftest.py +89 -0
  64. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/frontend/app.ts +111 -0
  65. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/frontend/components/OrderList.tsx +78 -0
  66. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/frontend/components/ProductCard.tsx +67 -0
  67. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/frontend/components/UserProfile.tsx +51 -0
  68. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/frontend/services/api.ts +101 -0
  69. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/frontend/services/auth.ts +82 -0
  70. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/frontend/services/cart.ts +118 -0
  71. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/frontend/types/index.ts +7 -0
  72. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/frontend/types/order.ts +60 -0
  73. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/frontend/types/product.ts +40 -0
  74. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/frontend/types/user.ts +46 -0
  75. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/frontend/utils/formatters.ts +73 -0
  76. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/api/__init__.py +13 -0
  77. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/api/middleware.py +106 -0
  78. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/api/routes.py +152 -0
  79. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/config/__init__.py +5 -0
  80. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/config/settings.py +57 -0
  81. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/main.py +71 -0
  82. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/models/__init__.py +15 -0
  83. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/models/order.py +75 -0
  84. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/models/product.py +46 -0
  85. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/models/user.py +46 -0
  86. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/services/__init__.py +13 -0
  87. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/services/notification_service.py +89 -0
  88. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/services/order_service.py +98 -0
  89. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/services/product_service.py +72 -0
  90. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/services/user_service.py +68 -0
  91. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/utils/__init__.py +13 -0
  92. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/utils/formatters.py +38 -0
  93. cartographing_kittens-0.1.0/tests/fixtures/benchmark_project/src/utils/validators.py +41 -0
  94. cartographing_kittens-0.1.0/tests/fixtures/sample_python_project/src/main.py +13 -0
  95. cartographing_kittens-0.1.0/tests/fixtures/sample_python_project/src/models/user.py +10 -0
  96. cartographing_kittens-0.1.0/tests/fixtures/sample_python_project/src/services/user_service.py +17 -0
  97. cartographing_kittens-0.1.0/tests/fixtures/sample_ts_project/src/main.ts +5 -0
  98. cartographing_kittens-0.1.0/tests/fixtures/sample_ts_project/src/service.ts +13 -0
  99. cartographing_kittens-0.1.0/tests/fixtures/sample_ts_project/src/types.ts +6 -0
  100. cartographing_kittens-0.1.0/tests/test_annotator.py +359 -0
  101. cartographing_kittens-0.1.0/tests/test_discovery.py +293 -0
  102. cartographing_kittens-0.1.0/tests/test_e2e.py +478 -0
  103. cartographing_kittens-0.1.0/tests/test_indexer.py +333 -0
  104. cartographing_kittens-0.1.0/tests/test_parsing.py +390 -0
  105. cartographing_kittens-0.1.0/tests/test_prompts.py +170 -0
  106. cartographing_kittens-0.1.0/tests/test_server.py +274 -0
  107. cartographing_kittens-0.1.0/tests/test_smoke.py +52 -0
  108. cartographing_kittens-0.1.0/tests/test_storage.py +406 -0
  109. cartographing_kittens-0.1.0/uv.lock +972 -0
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "cartographing-kitties",
3
+ "owner": {
4
+ "name": "Kakise",
5
+ "url": "https://a-smol-cat.fr"
6
+ },
7
+ "metadata": {
8
+ "description": "Plugin marketplace for Claude Code and Codex extensions",
9
+ "version": "1.0.0"
10
+ },
11
+ "plugins": [
12
+ {
13
+ "name": "cartograph",
14
+ "description": "AST-powered codebase intelligence for AI coding agents — dependency mapping, impact analysis, and semantic search via tree-sitter parsing and SQLite graph storage.",
15
+ "author": {
16
+ "name": "Kakise",
17
+ "url": "https://a-smol-cat.fr",
18
+ "email": "cartographing-kittens@a-smol-cat.fr"
19
+ },
20
+ "homepage": "https://github.com/Kakise/cartographing-kitties-plugin",
21
+ "tags": [
22
+ "ai-powered",
23
+ "codebase-intelligence",
24
+ "dependency-mapping",
25
+ "impact-analysis",
26
+ "semantic-search",
27
+ "tree-sitter",
28
+ "sqlite-graph-storage"
29
+ ],
30
+ "source": "./plugins/cartograph"
31
+ }
32
+ ]
33
+ }
@@ -0,0 +1,9 @@
1
+ # Changes here will be overwritten by Copier. Do not edit manually.
2
+ _commit: v0.2.25
3
+ _src_path: gh:jlevy/simple-modern-uv
4
+ package_author_email: cartographing-kittens@a-smol-cat.fr
5
+ package_author_name: Kakise
6
+ package_description: AST-powered codebase intelligence framework for AI coding agents
7
+ package_github_org: Kakise
8
+ package_module: cartograph
9
+ package_name: cartographing-kittens
@@ -0,0 +1,96 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
+ branches: ["main"]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ lint:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Checkout
17
+ uses: actions/checkout@v6
18
+
19
+ - name: Install uv
20
+ uses: astral-sh/setup-uv@v7
21
+ with:
22
+ version: "0.10.2"
23
+ enable-cache: true
24
+ python-version: "3.13"
25
+
26
+ - name: Set up Python
27
+ run: uv python install
28
+
29
+ - name: Install all dependencies
30
+ run: uv sync --all-extras
31
+
32
+ - name: Run pre-commit
33
+ uses: pre-commit/action@v3.0.1
34
+
35
+ test:
36
+ strategy:
37
+ matrix:
38
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
39
+
40
+ runs-on: ubuntu-latest
41
+
42
+ steps:
43
+ - name: Checkout
44
+ uses: actions/checkout@v6
45
+ with:
46
+ fetch-depth: 0
47
+
48
+ - name: Install uv
49
+ uses: astral-sh/setup-uv@v7
50
+ with:
51
+ version: "0.10.2"
52
+ enable-cache: true
53
+ python-version: ${{ matrix.python-version }}
54
+
55
+ - name: Set up Python
56
+ run: uv python install
57
+
58
+ - name: Install all dependencies
59
+ run: uv sync --all-extras
60
+
61
+ - name: Run tests
62
+ run: uv run pytest
63
+
64
+ validate-plugin:
65
+ runs-on: ubuntu-latest
66
+ steps:
67
+ - name: Checkout
68
+ uses: actions/checkout@v6
69
+
70
+ - name: Validate plugin.json
71
+ run: python -c "import json, sys; d=json.load(open('plugins/cartograph/.claude-plugin/plugin.json')); assert 'name' in d; assert 'mcpServers' in d; print('plugin.json valid')"
72
+
73
+ - name: Validate marketplace.json
74
+ run: python -c "import json, sys; d=json.load(open('.claude-plugin/marketplace.json')); assert 'name' in d; assert 'plugins' in d; print('marketplace.json valid')"
75
+
76
+ - name: Validate skill files exist
77
+ run: |
78
+ count=$(find plugins/cartograph/skills -mindepth 1 -maxdepth 1 -type d -exec test -f {}/SKILL.md \; -print | wc -l | tr -d ' ')
79
+ echo "Found $count skills"
80
+ if [ "$count" -lt 9 ]; then
81
+ echo "ERROR: Expected at least 9 skills, found $count"
82
+ find plugins/cartograph/skills -mindepth 1 -maxdepth 1 -type d | sort
83
+ exit 1
84
+ fi
85
+ echo "All skill files present"
86
+
87
+ - name: Validate agent files exist
88
+ run: |
89
+ count=$(find plugins/cartograph/agents -name '*.md' -type f | wc -l | tr -d ' ')
90
+ echo "Found $count agents"
91
+ if [ "$count" -lt 9 ]; then
92
+ echo "ERROR: Expected at least 9 agents, found $count"
93
+ find plugins/cartograph/agents -name '*.md' -type f | sort
94
+ exit 1
95
+ fi
96
+ echo "All agent files present"
@@ -0,0 +1,43 @@
1
+ name: Publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ build-and-publish:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ id-token: write
13
+ contents: write
14
+ steps:
15
+ - name: Checkout
16
+ uses: actions/checkout@v6
17
+ with:
18
+ fetch-depth: 0
19
+
20
+ - name: Install uv
21
+ uses: astral-sh/setup-uv@v7
22
+ with:
23
+ version: "0.10.2"
24
+ enable-cache: true
25
+ python-version: "3.12"
26
+
27
+ - name: Set up Python
28
+ run: uv python install
29
+
30
+ - name: Install all dependencies
31
+ run: uv sync --all-extras
32
+
33
+ - name: Run tests
34
+ run: uv run pytest
35
+
36
+ - name: Build package
37
+ run: uv build
38
+
39
+ - name: Publish to PyPI
40
+ run: uv publish --trusted-publishing always
41
+
42
+ - name: Validate plugin structure
43
+ run: python -c "import json; d=json.load(open('plugins/cartograph/.claude-plugin/plugin.json')); assert 'name' in d; assert 'mcpServers' in d; print('Plugin structure valid')"
@@ -0,0 +1,35 @@
1
+ # Cartograph database files
2
+ .cartograph/
3
+
4
+ # Python
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+ *.egg-info/
9
+ dist/
10
+ build/
11
+ *.egg
12
+ .eggs/
13
+
14
+ # Virtual environments
15
+ .venv/
16
+ venv/
17
+ env/
18
+
19
+ # Testing
20
+ .pytest_cache/
21
+ .coverage
22
+ htmlcov/
23
+
24
+ # IDE
25
+ .idea/
26
+ .vscode/
27
+ *.swp
28
+ *.swo
29
+
30
+ # OS
31
+ .DS_Store
32
+ Thumbs.db
33
+
34
+ # uv
35
+ .uv/
@@ -0,0 +1,23 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.15.1
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix]
7
+ exclude: ^tests/
8
+ - id: ruff-format
9
+ exclude: ^tests/
10
+
11
+ - repo: https://github.com/codespell-project/codespell
12
+ rev: v2.4.1
13
+ hooks:
14
+ - id: codespell
15
+ additional_dependencies: [tomli]
16
+ args: [src]
17
+
18
+ - repo: https://github.com/DetachHead/basedpyright-pre-commit-mirror
19
+ rev: 1.38.0
20
+ hooks:
21
+ - id: basedpyright
22
+ args: [--level, error]
23
+ exclude: ^tests/
@@ -0,0 +1 @@
1
+ 3.11
@@ -0,0 +1,158 @@
1
+ # Cartograph
2
+
3
+ AST-powered codebase intelligence framework for AI coding agents.
4
+
5
+ ## Architecture
6
+
7
+ | Layer | Location | Purpose |
8
+ |-------|----------|---------|
9
+ | Parsing | `src/cartograph/parsing/` | Tree-sitter AST extraction for Python, TypeScript, JavaScript |
10
+ | Indexing | `src/cartograph/indexing/` | File discovery, incremental change detection, cross-file resolution |
11
+ | Storage | `src/cartograph/storage/` | SQLite graph database with FTS5 search and recursive CTE traversal |
12
+ | Annotation | `src/cartograph/annotation/` | LLM-driven semantic enrichment (summaries, tags, roles) |
13
+ | MCP Server | `src/cartograph/server/` | FastMCP server — 9 tools, 3 prompts |
14
+ | Server Tools | `src/cartograph/server/tools/` | Tool implementations (index, query, analysis, annotate) |
15
+ | Server Prompts | `src/cartograph/server/prompts/` | Prompt implementations (explore, refactor, annotate) |
16
+
17
+ ## Conventions
18
+
19
+ - Qualified names use `::` separator: `module.path::ClassName::method_name`
20
+ - Edge kinds: `imports`, `calls`, `inherits`, `contains`, `depends_on`
21
+ - Node kinds: `module`, `class`, `function`, `method`, `variable`
22
+ - Graph stored at `.cartograph/graph.db` in project root
23
+ - Indexing is incremental by default — only changed files are re-parsed
24
+
25
+ ## Plugin Structure (Marketplace Layout)
26
+
27
+ ```
28
+ plugins/
29
+ cartograph/ # Plugin root (marketplace layout)
30
+ .claude-plugin/plugin.json # Plugin manifest (uvx-based MCP server)
31
+ skills/
32
+ cartograph/ # Router skill — delegates to sub-skills
33
+ SKILL.md
34
+ references/
35
+ tool-reference.md # Detailed tool parameter docs
36
+ annotation-workflow.md # Annotation workflow guide
37
+ cartograph-explore/ # Structural exploration
38
+ cartograph-impact/ # Impact analysis and refactoring
39
+ cartograph-annotate/ # Annotation workflow
40
+ cartograph-brainstorm/ # Requirements gathering with research swarms
41
+ cartograph-plan/ # Technical planning with 4 research agents
42
+ cartograph-work/ # Execution with Cartograph-first workers
43
+ cartograph-review/ # Multi-agent review with structural analysis
44
+ cartograph-lfg/ # Full autonomous pipeline (plan → work → review)
45
+ agents/
46
+ cartograph-annotator.md # Batch annotation specialist
47
+ cartograph-researcher.md # General codebase researcher
48
+ cartograph-pattern-analyst.md # Pattern and convention finder
49
+ cartograph-impact-analyst.md # Blast radius analyzer
50
+ cartograph-flow-analyzer.md # Call chain and data flow tracer
51
+ cartograph-correctness-reviewer.md # Logic errors, edge cases (always-on)
52
+ cartograph-testing-reviewer.md # Test coverage gaps (always-on)
53
+ cartograph-impact-reviewer.md # Blast radius review (conditional)
54
+ cartograph-structure-reviewer.md # Architecture review (conditional)
55
+ src/cartograph/ # Python source (MCP server + core library)
56
+ tests/ # Test suite
57
+ ```
58
+
59
+ ## Workflow Pipeline
60
+
61
+ ```
62
+ cartograph:brainstorm → cartograph:plan → cartograph:work → cartograph:review
63
+ ```
64
+
65
+ Or use `cartograph:lfg` for full autonomous execution (plan → work → review).
66
+
67
+ ### When to use each skill
68
+
69
+ | Situation | Skill |
70
+ |-----------|-------|
71
+ | Exploring code structure | `cartograph:explore` |
72
+ | Understanding change impact | `cartograph:impact` |
73
+ | Enabling semantic search | `cartograph:annotate` |
74
+ | Gathering requirements for a feature | `cartograph:brainstorm` |
75
+ | Planning implementation | `cartograph:plan` |
76
+ | Building features | `cartograph:work` |
77
+ | Reviewing code changes | `cartograph:review` |
78
+ | Full autonomous pipeline | `cartograph:lfg` |
79
+
80
+ ### How skills dispatch agents
81
+
82
+ **cartograph:brainstorm** dispatches in parallel:
83
+ - `cartograph-researcher` (architecture, stack)
84
+ - `cartograph-pattern-analyst` (existing patterns)
85
+
86
+ **cartograph:plan** dispatches in parallel:
87
+ - `cartograph-researcher` (architecture)
88
+ - `cartograph-pattern-analyst` (patterns)
89
+ - `cartograph-flow-analyzer` (call chains)
90
+ - `cartograph-impact-analyst` (blast radius)
91
+
92
+ **cartograph:work** dispatches workers per implementation unit:
93
+ - Each worker calls `get_file_structure` + `query_node` before implementing
94
+ - Independent units run as parallel swarm
95
+
96
+ **cartograph:review** dispatches in parallel:
97
+ - `cartograph-correctness-reviewer` (always)
98
+ - `cartograph-testing-reviewer` (always)
99
+ - `cartograph-impact-reviewer` (when 3+ files changed)
100
+ - `cartograph-structure-reviewer` (when new files created)
101
+
102
+ ## Agent Output Contracts
103
+
104
+ Research agents return structured text summaries with:
105
+ - Technology & stack, architecture, patterns, key files, dependencies, conventions
106
+
107
+ Review agents return JSON:
108
+ ```json
109
+ {
110
+ "reviewer": "agent-name",
111
+ "findings": [{
112
+ "severity": "P0|P1|P2|P3",
113
+ "category": "...",
114
+ "location": "file:line",
115
+ "issue": "description",
116
+ "guidance": "how to fix",
117
+ "confidence": 0.85,
118
+ "autofix_class": "safe_auto|gated_auto|manual|advisory"
119
+ }],
120
+ "summary": "overall assessment"
121
+ }
122
+ ```
123
+
124
+ ## Cartograph-First Principle
125
+
126
+ All agents and skills use Cartograph MCP tools as primary codebase intelligence:
127
+
128
+ | Need | Tool | NOT |
129
+ |------|------|----|
130
+ | Understand a file's structure | `get_file_structure` | Reading entire file |
131
+ | Find what depends on X | `find_dependents` | Grep for import statements |
132
+ | Understand a symbol | `query_node` | Grep for the name |
133
+ | Find code by domain | `search` (after annotation) | Grep for keywords |
134
+ | Assess change impact | `find_dependents` + `find_dependencies` | Manual file reading |
135
+
136
+ Fall back to grep/glob only for text-literal searches (error messages, string constants, TODOs).
137
+
138
+ ## Development
139
+
140
+ ```bash
141
+ uv sync --all-extras # Install dependencies
142
+ uv run pytest # Run tests
143
+ uv run ruff check src/ # Lint
144
+ uv run ruff format --check src/ # Format check
145
+ uv run basedpyright --level error # Type check
146
+ uv run codespell src # Spell check
147
+ ```
148
+
149
+ ## MCP Server (local dev)
150
+
151
+ ```bash
152
+ uv run python -m cartograph.server.main # Start server via stdio
153
+ ```
154
+
155
+ ## Testing
156
+
157
+ Tests live in `tests/`. Fixtures in `tests/fixtures/` are sample projects — not test modules.
158
+ Run with `uv run pytest`. CI matrix tests Python 3.11-3.14.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kakise
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.