codebase-intel 0.1.0__tar.gz → 0.3.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.
- codebase_intel-0.3.0/.codebase-intel/intent-journal/journal.jsonl +6 -0
- codebase_intel-0.3.0/.codebase-intel/intents/INT-001.yaml +39 -0
- codebase_intel-0.3.0/.codebase-intel/intents/INT-002.yaml +35 -0
- codebase_intel-0.3.0/.codebase-intel/intents/INT-003.yaml +55 -0
- codebase_intel-0.3.0/.github/workflows/ci.yml +30 -0
- codebase_intel-0.3.0/.github/workflows/publish.yml +24 -0
- codebase_intel-0.3.0/.gitignore +52 -0
- codebase_intel-0.3.0/CHANGELOG.md +52 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/CLAUDE.md +30 -4
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/CONTRIBUTING.md +1 -1
- codebase_intel-0.3.0/HANDOFF.md +104 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/LICENSE +1 -1
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/PKG-INFO +167 -18
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/README.md +161 -13
- codebase_intel-0.3.0/docs/EVAL-RESULTS.md +71 -0
- codebase_intel-0.3.0/docs/TASK-LEDGER.md +223 -0
- codebase_intel-0.3.0/docs/V2-PLAN.md +185 -0
- codebase_intel-0.3.0/docs/intent-graph.html +1 -0
- codebase_intel-0.3.0/launch/awesome_list_submissions.md +45 -0
- codebase_intel-0.3.0/launch/devto_article.md +180 -0
- codebase_intel-0.3.0/launch/hackernews.md +40 -0
- codebase_intel-0.3.0/launch/reddit_claudeai.md +68 -0
- codebase_intel-0.3.0/launch/reddit_python.md +48 -0
- codebase_intel-0.3.0/launch/x_thread.md +84 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/pyproject.toml +12 -4
- codebase_intel-0.3.0/skills/codebase-intel/SKILL.md +89 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/__init__.py +1 -1
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/analytics/benchmark.py +60 -68
- codebase_intel-0.3.0/src/codebase_intel/analytics/eval.py +288 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/analytics/feedback.py +39 -22
- codebase_intel-0.3.0/src/codebase_intel/analytics/naive.py +49 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/analytics/tracker.py +68 -6
- codebase_intel-0.3.0/src/codebase_intel/cli/main.py +1489 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/contracts/auto_generator.py +199 -129
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/contracts/evaluator.py +59 -62
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/contracts/models.py +28 -11
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/contracts/registry.py +9 -11
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/core/config.py +24 -6
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/core/exceptions.py +8 -14
- codebase_intel-0.3.0/src/codebase_intel/core/text.py +51 -0
- codebase_intel-0.3.0/src/codebase_intel/core/tokens.py +35 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/core/types.py +10 -12
- codebase_intel-0.3.0/src/codebase_intel/crossrepo/__init__.py +1 -0
- codebase_intel-0.3.0/src/codebase_intel/crossrepo/models.py +196 -0
- codebase_intel-0.3.0/src/codebase_intel/crossrepo/registry.py +377 -0
- codebase_intel-0.3.0/src/codebase_intel/crossrepo/scanner.py +490 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/decisions/miner.py +63 -38
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/decisions/models.py +9 -13
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/decisions/store.py +24 -25
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/drift/detector.py +121 -100
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/graph/builder.py +30 -16
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/graph/parser.py +193 -149
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/graph/query.py +8 -21
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/graph/storage.py +12 -14
- codebase_intel-0.3.0/src/codebase_intel/intent/__init__.py +1 -0
- codebase_intel-0.3.0/src/codebase_intel/intent/models.py +185 -0
- codebase_intel-0.3.0/src/codebase_intel/intent/store.py +195 -0
- codebase_intel-0.3.0/src/codebase_intel/intent/verifier.py +374 -0
- codebase_intel-0.3.0/src/codebase_intel/intentgraph/__init__.py +64 -0
- codebase_intel-0.3.0/src/codebase_intel/intentgraph/anchors.py +372 -0
- codebase_intel-0.3.0/src/codebase_intel/intentgraph/bootstrap.py +179 -0
- codebase_intel-0.3.0/src/codebase_intel/intentgraph/capture.py +240 -0
- codebase_intel-0.3.0/src/codebase_intel/intentgraph/classifier.py +175 -0
- codebase_intel-0.3.0/src/codebase_intel/intentgraph/gate.py +128 -0
- codebase_intel-0.3.0/src/codebase_intel/intentgraph/journal.py +118 -0
- codebase_intel-0.3.0/src/codebase_intel/intentgraph/migrate.py +183 -0
- codebase_intel-0.3.0/src/codebase_intel/intentgraph/models.py +294 -0
- codebase_intel-0.3.0/src/codebase_intel/intentgraph/render.py +163 -0
- codebase_intel-0.3.0/src/codebase_intel/intentgraph/store.py +398 -0
- codebase_intel-0.3.0/src/codebase_intel/intentgraph/traversal.py +87 -0
- codebase_intel-0.3.0/src/codebase_intel/mcp/server.py +1548 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/orchestrator/assembler.py +80 -104
- codebase_intel-0.3.0/src/codebase_intel/workspace/__init__.py +13 -0
- codebase_intel-0.3.0/src/codebase_intel/workspace/manager.py +329 -0
- codebase_intel-0.3.0/src/codebase_intel/workspace/registry.py +238 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/tests/conftest.py +10 -7
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/tests/integration/test_graph_pipeline.py +18 -54
- codebase_intel-0.3.0/tests/integration/test_intent_gate.py +138 -0
- codebase_intel-0.3.0/tests/unit/analytics/test_eval.py +183 -0
- codebase_intel-0.3.0/tests/unit/analytics/test_naive.py +42 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/tests/unit/contracts/test_evaluator.py +14 -42
- codebase_intel-0.3.0/tests/unit/core/test_text.py +22 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/tests/unit/core/test_types.py +13 -1
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/tests/unit/decisions/test_store.py +119 -47
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/tests/unit/drift/test_detector.py +86 -54
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/tests/unit/graph/test_parser.py +20 -64
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/tests/unit/graph/test_storage.py +17 -50
- codebase_intel-0.3.0/tests/unit/intentgraph/__init__.py +0 -0
- codebase_intel-0.3.0/tests/unit/intentgraph/test_anchors.py +273 -0
- codebase_intel-0.3.0/tests/unit/intentgraph/test_bootstrap.py +196 -0
- codebase_intel-0.3.0/tests/unit/intentgraph/test_capture.py +146 -0
- codebase_intel-0.3.0/tests/unit/intentgraph/test_classifier.py +110 -0
- codebase_intel-0.3.0/tests/unit/intentgraph/test_journal.py +99 -0
- codebase_intel-0.3.0/tests/unit/intentgraph/test_migrate.py +157 -0
- codebase_intel-0.3.0/tests/unit/intentgraph/test_models.py +171 -0
- codebase_intel-0.3.0/tests/unit/intentgraph/test_render.py +134 -0
- codebase_intel-0.3.0/tests/unit/intentgraph/test_store.py +298 -0
- codebase_intel-0.3.0/tests/unit/intentgraph/test_traversal.py +118 -0
- codebase_intel-0.3.0/tests/unit/orchestrator/__init__.py +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/tests/unit/orchestrator/test_assembler.py +3 -9
- codebase_intel-0.3.0/tests/unit/test_version.py +20 -0
- codebase_intel-0.3.0/tests/unit/workspace/__init__.py +0 -0
- codebase_intel-0.3.0/tests/unit/workspace/test_manager.py +295 -0
- codebase_intel-0.3.0/tests/unit/workspace/test_registry.py +204 -0
- codebase_intel-0.3.0/tests/unit/workspace/test_server_integration.py +46 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/uv.lock +19 -1
- codebase_intel-0.1.0/.github/workflows/ci.yml +0 -48
- codebase_intel-0.1.0/.gitignore +0 -41
- codebase_intel-0.1.0/src/codebase_intel/cli/main.py +0 -740
- codebase_intel-0.1.0/src/codebase_intel/mcp/server.py +0 -710
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/community-contracts/fastapi.yaml +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/community-contracts/nodejs-express.yaml +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/community-contracts/react-typescript.yaml +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/docs/COMPARISON.md +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/analytics/__init__.py +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/cli/__init__.py +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/contracts/__init__.py +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/core/__init__.py +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/decisions/__init__.py +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/drift/__init__.py +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/graph/__init__.py +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/mcp/__init__.py +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/src/codebase_intel/orchestrator/__init__.py +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/tests/__init__.py +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/tests/integration/__init__.py +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/tests/unit/__init__.py +0 -0
- {codebase_intel-0.1.0/tests/unit/contracts → codebase_intel-0.3.0/tests/unit/analytics}/__init__.py +0 -0
- {codebase_intel-0.1.0/tests/unit/core → codebase_intel-0.3.0/tests/unit/contracts}/__init__.py +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/tests/unit/contracts/test_models.py +0 -0
- {codebase_intel-0.1.0/tests/unit/decisions → codebase_intel-0.3.0/tests/unit/core}/__init__.py +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/tests/unit/core/test_exceptions.py +0 -0
- {codebase_intel-0.1.0/tests/unit/drift → codebase_intel-0.3.0/tests/unit/decisions}/__init__.py +0 -0
- {codebase_intel-0.1.0 → codebase_intel-0.3.0}/tests/unit/decisions/test_models.py +0 -0
- {codebase_intel-0.1.0/tests/unit/graph → codebase_intel-0.3.0/tests/unit/drift}/__init__.py +0 -0
- {codebase_intel-0.1.0/tests/unit/orchestrator → codebase_intel-0.3.0/tests/unit/graph}/__init__.py +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{"actor": "cli", "entry_id": "c75235b94d883dc3", "op": "add_node", "payload": {"anchors": [{"content_hash": null, "file_path": "/home/phoenix/Documents/playground/codebase-intel/src/codebase_intel/intentgraph/journal.py", "line_range": null, "symbol_name": null}, {"content_hash": null, "file_path": "/home/phoenix/Documents/playground/codebase-intel/src/codebase_intel/intentgraph/store.py", "line_range": null, "symbol_name": null}], "author": "human", "confidence": 1.0, "created_at": "2026-07-17T17:57:17.836420Z", "decision_id": null, "level": 3, "metadata": {}, "node_id": "4dad4394663a3ee1", "session": null, "source": "capture", "status": "active", "supersede_reason": null, "superseded_by": null, "tags": ["architecture"], "title": "Journal-first intent storage", "trust": "confirmed", "updated_at": "2026-07-17T17:57:17.836424Z", "why": "SQLite index is derived and rebuildable; the JSONL journal committed to git is the source of truth — crash-safety, portability, merge-friendliness"}, "ts": "2026-07-17T17:57:17.836528Z"}
|
|
2
|
+
{"actor": "cli", "entry_id": "c9bf75e21d4b0f5d", "op": "add_node", "payload": {"anchors": [{"content_hash": null, "file_path": "/home/phoenix/Documents/playground/codebase-intel/src/codebase_intel/intentgraph/gate.py", "line_range": null, "symbol_name": null}], "author": "human", "confidence": 1.0, "created_at": "2026-07-17T17:57:18.329111Z", "decision_id": null, "level": 3, "metadata": {}, "node_id": "6c89907cccd0d567", "session": null, "source": "capture", "status": "active", "supersede_reason": null, "superseded_by": null, "tags": ["capture"], "title": "Soft pre-commit gate by default", "trust": "confirmed", "updated_at": "2026-07-17T17:57:18.329116Z", "why": "A hard gate that blocks hotfixes gets uninstalled; soft mode warns and leaves a missing-why backlog node, hard mode is per-repo opt-in"}, "ts": "2026-07-17T17:57:18.329248Z"}
|
|
3
|
+
{"actor": "cli", "entry_id": "19e25c83c221c1c2", "op": "add_node", "payload": {"anchors": [{"content_hash": null, "file_path": "/home/phoenix/Documents/playground/codebase-intel/src/codebase_intel/intentgraph/models.py", "line_range": null, "symbol_name": null}], "author": "human", "confidence": 1.0, "created_at": "2026-07-17T17:57:18.799017Z", "decision_id": null, "level": 3, "metadata": {}, "node_id": "bf8c7774b6ad86ef", "session": null, "source": "capture", "status": "active", "supersede_reason": null, "superseded_by": null, "tags": ["trust"], "title": "Trust tiers surfaced everywhere", "trust": "confirmed", "updated_at": "2026-07-17T17:57:18.799022Z", "why": "A hallucinated why is worse than none — mined/derived/asserted/confirmed tiers appear in every rendered answer so agents can weigh belief"}, "ts": "2026-07-17T17:57:18.799121Z"}
|
|
4
|
+
{"actor": "honesty", "entry_id": "4345f164f5d49491", "op": "update_node", "payload": {"changes": {"anchors": [{"content_hash": "3c48a38271e70ea5", "file_path": "/home/phoenix/Documents/playground/codebase-intel/src/codebase_intel/intentgraph/journal.py", "line_range": null, "symbol_name": null}, {"content_hash": "4973465f9237c937", "file_path": "/home/phoenix/Documents/playground/codebase-intel/src/codebase_intel/intentgraph/store.py", "line_range": null, "symbol_name": null}]}, "node_id": "4dad4394663a3ee1"}, "ts": "2026-07-17T18:01:40.723012Z"}
|
|
5
|
+
{"actor": "honesty", "entry_id": "7ed94ef9d40e7393", "op": "update_node", "payload": {"changes": {"anchors": [{"content_hash": "8358c0e41997c035", "file_path": "/home/phoenix/Documents/playground/codebase-intel/src/codebase_intel/intentgraph/gate.py", "line_range": null, "symbol_name": null}]}, "node_id": "6c89907cccd0d567"}, "ts": "2026-07-17T18:01:40.728759Z"}
|
|
6
|
+
{"actor": "honesty", "entry_id": "92aad8529d3af2af", "op": "update_node", "payload": {"changes": {"anchors": [{"content_hash": "5b9e6e9b15bf8b83", "file_path": "/home/phoenix/Documents/playground/codebase-intel/src/codebase_intel/intentgraph/models.py", "line_range": null, "symbol_name": null}]}, "node_id": "bf8c7774b6ad86ef"}, "ts": "2026-07-17T18:01:40.732727Z"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
id: INT-001
|
|
2
|
+
title: Live efficiency tracking must work end-to-end via MCP
|
|
3
|
+
description: Every get_context MCP call must record analytics, and the dashboard must
|
|
4
|
+
show real data from actual MCP usage.
|
|
5
|
+
status: verified
|
|
6
|
+
priority: 1
|
|
7
|
+
criteria:
|
|
8
|
+
- description: Analytics tracker module exists
|
|
9
|
+
criterion_type: file_exists
|
|
10
|
+
check_value: src/codebase_intel/analytics/tracker.py
|
|
11
|
+
verified: true
|
|
12
|
+
- description: MCP server initializes analytics tracker
|
|
13
|
+
criterion_type: file_contains
|
|
14
|
+
check_value: src/codebase_intel/mcp/server.py::AnalyticsTracker
|
|
15
|
+
verified: true
|
|
16
|
+
- description: Assembler accepts analytics_tracker parameter
|
|
17
|
+
criterion_type: file_contains
|
|
18
|
+
check_value: src/codebase_intel/orchestrator/assembler.py::analytics_tracker
|
|
19
|
+
verified: true
|
|
20
|
+
- description: MCP server passes analytics to assembler
|
|
21
|
+
criterion_type: file_contains
|
|
22
|
+
check_value: src/codebase_intel/mcp/server.py::analytics_tracker=state
|
|
23
|
+
verified: true
|
|
24
|
+
- description: Dashboard CLI command exists
|
|
25
|
+
criterion_type: grep_match
|
|
26
|
+
check_value: def dashboard::src/codebase_intel/cli/main.py
|
|
27
|
+
verified: true
|
|
28
|
+
- description: Benchmark CLI command exists
|
|
29
|
+
criterion_type: grep_match
|
|
30
|
+
check_value: def benchmark::src/codebase_intel/cli/main.py
|
|
31
|
+
verified: true
|
|
32
|
+
created_at: '2026-04-08T12:51:28.427512Z'
|
|
33
|
+
updated_at: '2026-04-08T12:51:28.432214Z'
|
|
34
|
+
verified_at: '2026-04-08T12:51:28.432215Z'
|
|
35
|
+
session_id: null
|
|
36
|
+
tags:
|
|
37
|
+
- core
|
|
38
|
+
- analytics
|
|
39
|
+
- mcp
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
id: INT-002
|
|
2
|
+
title: Feedback loop must capture acceptance/rejection via MCP
|
|
3
|
+
description: Agents must be able to report whether their output was accepted or rejected,
|
|
4
|
+
and the system must learn from this.
|
|
5
|
+
status: verified
|
|
6
|
+
priority: 1
|
|
7
|
+
criteria:
|
|
8
|
+
- description: Feedback tracker module exists
|
|
9
|
+
criterion_type: file_exists
|
|
10
|
+
check_value: src/codebase_intel/analytics/feedback.py
|
|
11
|
+
verified: true
|
|
12
|
+
- description: MCP server has record_feedback tool
|
|
13
|
+
criterion_type: mcp_tool_exists
|
|
14
|
+
check_value: record_feedback
|
|
15
|
+
verified: true
|
|
16
|
+
- description: MCP server has get_efficiency_report tool
|
|
17
|
+
criterion_type: mcp_tool_exists
|
|
18
|
+
check_value: get_efficiency_report
|
|
19
|
+
verified: true
|
|
20
|
+
- description: MCP server initializes feedback tracker
|
|
21
|
+
criterion_type: file_contains
|
|
22
|
+
check_value: src/codebase_intel/mcp/server.py::FeedbackTracker
|
|
23
|
+
verified: true
|
|
24
|
+
- description: Feedback handler maps rejection reasons to suggestions
|
|
25
|
+
criterion_type: file_contains
|
|
26
|
+
check_value: src/codebase_intel/analytics/feedback.py::_suggestion_for_reason
|
|
27
|
+
verified: true
|
|
28
|
+
created_at: '2026-04-08T12:51:28.428541Z'
|
|
29
|
+
updated_at: '2026-04-08T12:51:28.532925Z'
|
|
30
|
+
verified_at: '2026-04-08T12:51:28.532935Z'
|
|
31
|
+
session_id: null
|
|
32
|
+
tags:
|
|
33
|
+
- core
|
|
34
|
+
- feedback
|
|
35
|
+
- mcp
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
id: INT-003
|
|
2
|
+
title: Intent tracking must prevent 'built but not wired' gaps
|
|
3
|
+
description: The system must capture user goals, verify acceptance criteria against
|
|
4
|
+
actual code, and flag unmet criteria before marking done.
|
|
5
|
+
status: verified
|
|
6
|
+
priority: 1
|
|
7
|
+
criteria:
|
|
8
|
+
- description: Intent models exist
|
|
9
|
+
criterion_type: file_exists
|
|
10
|
+
check_value: src/codebase_intel/intent/models.py
|
|
11
|
+
verified: true
|
|
12
|
+
- description: Intent verifier exists
|
|
13
|
+
criterion_type: file_exists
|
|
14
|
+
check_value: src/codebase_intel/intent/verifier.py
|
|
15
|
+
verified: true
|
|
16
|
+
- description: Intent store exists
|
|
17
|
+
criterion_type: file_exists
|
|
18
|
+
check_value: src/codebase_intel/intent/store.py
|
|
19
|
+
verified: true
|
|
20
|
+
- description: MCP server has set_intent tool
|
|
21
|
+
criterion_type: mcp_tool_exists
|
|
22
|
+
check_value: set_intent
|
|
23
|
+
verified: true
|
|
24
|
+
- description: MCP server has check_intent tool
|
|
25
|
+
criterion_type: mcp_tool_exists
|
|
26
|
+
check_value: check_intent
|
|
27
|
+
verified: true
|
|
28
|
+
- description: MCP server has list_intents tool
|
|
29
|
+
criterion_type: mcp_tool_exists
|
|
30
|
+
check_value: list_intents
|
|
31
|
+
verified: true
|
|
32
|
+
- description: CLI intent command exists
|
|
33
|
+
criterion_type: grep_match
|
|
34
|
+
check_value: def intent::src/codebase_intel/cli/main.py
|
|
35
|
+
verified: true
|
|
36
|
+
- description: Verifier can check file_exists criterion
|
|
37
|
+
criterion_type: function_exists
|
|
38
|
+
check_value: _check_file_exists
|
|
39
|
+
verified: true
|
|
40
|
+
- description: Verifier can check file_contains criterion
|
|
41
|
+
criterion_type: function_exists
|
|
42
|
+
check_value: _check_file_contains
|
|
43
|
+
verified: true
|
|
44
|
+
- description: Verifier can check wired criterion
|
|
45
|
+
criterion_type: function_exists
|
|
46
|
+
check_value: _check_wired
|
|
47
|
+
verified: true
|
|
48
|
+
created_at: '2026-04-08T12:51:28.430099Z'
|
|
49
|
+
updated_at: '2026-04-08T12:51:28.545922Z'
|
|
50
|
+
verified_at: '2026-04-08T12:51:28.545924Z'
|
|
51
|
+
session_id: null
|
|
52
|
+
tags:
|
|
53
|
+
- core
|
|
54
|
+
- intent
|
|
55
|
+
- verification
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
test:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.11", "3.12"]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: astral-sh/setup-uv@v5
|
|
21
|
+
with:
|
|
22
|
+
version: "latest"
|
|
23
|
+
- uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
- run: uv venv
|
|
27
|
+
- run: uv pip install -e ".[dev]"
|
|
28
|
+
- run: uv run pytest tests/unit/ -x -q --no-header -p no:cacheprovider -o "addopts="
|
|
29
|
+
env:
|
|
30
|
+
PYTHONDONTWRITEBYTECODE: 1
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
id-token: write
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
publish:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
environment: pypi
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: astral-sh/setup-uv@v5
|
|
17
|
+
with:
|
|
18
|
+
version: "latest"
|
|
19
|
+
- run: uv python install 3.12
|
|
20
|
+
- run: uv build
|
|
21
|
+
- name: Publish to PyPI
|
|
22
|
+
run: uv publish
|
|
23
|
+
env:
|
|
24
|
+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
*.egg-info/
|
|
7
|
+
*.egg
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
.eggs/
|
|
11
|
+
|
|
12
|
+
# Virtual environments
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
env/
|
|
16
|
+
|
|
17
|
+
# IDE
|
|
18
|
+
.idea/
|
|
19
|
+
.vscode/
|
|
20
|
+
*.swp
|
|
21
|
+
*.swo
|
|
22
|
+
*~
|
|
23
|
+
|
|
24
|
+
# Testing
|
|
25
|
+
.coverage
|
|
26
|
+
htmlcov/
|
|
27
|
+
.pytest_cache/
|
|
28
|
+
.mypy_cache/
|
|
29
|
+
|
|
30
|
+
# OS
|
|
31
|
+
.DS_Store
|
|
32
|
+
Thumbs.db
|
|
33
|
+
|
|
34
|
+
# Project runtime data (generated by codebase-intel itself)
|
|
35
|
+
.codebase-intel/graph.db
|
|
36
|
+
.codebase-intel/graph.db-wal
|
|
37
|
+
.codebase-intel/graph.db-shm
|
|
38
|
+
# Intent graph: the SQLite index is derived and rebuildable — the journal (JSONL) IS committed
|
|
39
|
+
.codebase-intel/intent-graph.db
|
|
40
|
+
.codebase-intel/intent-graph.db-wal
|
|
41
|
+
.codebase-intel/intent-graph.db-shm
|
|
42
|
+
# Analytics/benchmark/eval history — local telemetry, not project state
|
|
43
|
+
.codebase-intel/analytics.db
|
|
44
|
+
.codebase-intel/analytics.db-wal
|
|
45
|
+
.codebase-intel/analytics.db-shm
|
|
46
|
+
.codebase-intel/feedback.db
|
|
47
|
+
.codebase-intel/feedback.db-wal
|
|
48
|
+
.codebase-intel/feedback.db-shm
|
|
49
|
+
|
|
50
|
+
# Environment
|
|
51
|
+
.env
|
|
52
|
+
.env.*
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses
|
|
5
|
+
[Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [0.3.0] — 2026-10-23
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Intent graph (v2).** A multi-level "why" layer. `.codebase-intel/intent-journal/*.jsonl` is the
|
|
12
|
+
committed source of truth, and `intent-graph.db` is a rebuildable, git-ignored index. Nodes
|
|
13
|
+
carry trust tiers (`mined` → `derived` → `asserted` → `confirmed`) and four abstraction levels.
|
|
14
|
+
- MCP tools: `bootstrap`, `check_precedent`, `record_why`, `get_intent`. The server now exposes 16 tools.
|
|
15
|
+
- CLI: `why`, `intent-gate`, `install-hooks`, `intent-check`, `intent-confirm`, `intent-render`,
|
|
16
|
+
`intent-migrate`, `intent-rebuild`, `intent-eval`.
|
|
17
|
+
- Pre-commit intent gate that warns (or blocks, with `intentgraph.gate_hard`) on structural
|
|
18
|
+
changes with no recorded why.
|
|
19
|
+
- Anchor repair and re-anchoring when code moves; divergence, conflict and coverage reporting.
|
|
20
|
+
- Human projection of the intent graph as HTML or Mermaid.
|
|
21
|
+
- Safe, re-runnable migration of v1 decision records into the intent graph.
|
|
22
|
+
- Eval harness (`intent-eval`) measuring token cost and retrieval correctness against the v1
|
|
23
|
+
baseline. Self-hosted results and caveats are in `docs/EVAL-RESULTS.md`.
|
|
24
|
+
- Agent skill at `skills/codebase-intel/SKILL.md` that tells agents when to call the intent tools.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- The package version now comes from `codebase_intel.__version__`, and `get_status` reports
|
|
29
|
+
it. Before this, three version strings had drifted apart: `0.1.0`, `0.2.0` and `0.2.0`.
|
|
30
|
+
- Project URLs in the package metadata now point to the actual GitHub repository.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- Removed all pre-existing ruff and mypy errors in the v1 modules.
|
|
35
|
+
|
|
36
|
+
## [0.2.0] — 2026-04-09
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- Global workspace manager: one MCP server for every registered project (`serve --auto`).
|
|
41
|
+
- Intent tracking (`set_intent`, `check_intent`, `list_intents`) with machine-verifiable
|
|
42
|
+
acceptance criteria.
|
|
43
|
+
- Cross-repo awareness across 14 web frameworks in 10 languages.
|
|
44
|
+
- Feedback loop and efficiency reporting.
|
|
45
|
+
|
|
46
|
+
## [0.1.0]
|
|
47
|
+
|
|
48
|
+
- Initial release: code graph, decision journal, quality contracts, drift detection, MCP server, CLI.
|
|
49
|
+
|
|
50
|
+
[0.3.0]: https://github.com/a-mutharasu/codebase-intel/compare/v0.2.0...v0.3.0
|
|
51
|
+
[0.2.0]: https://github.com/a-mutharasu/codebase-intel/compare/v0.1.0...v0.2.0
|
|
52
|
+
[0.1.0]: https://github.com/a-mutharasu/codebase-intel/releases/tag/v0.1.0
|
|
@@ -56,10 +56,20 @@ src/codebase_intel/
|
|
|
56
56
|
├── contracts/ # models.py, parser.py, evaluator.py, registry.py
|
|
57
57
|
├── orchestrator/ # assembler.py, budget.py, scorer.py, conflict.py
|
|
58
58
|
├── drift/ # detector.py, reporter.py
|
|
59
|
-
├──
|
|
59
|
+
├── intentgraph/ # v2 core: models, journal (JSONL truth), store (SQLite index),
|
|
60
|
+
│ # capture, classifier, gate, traversal, bootstrap, anchors,
|
|
61
|
+
│ # render, migrate — the multi-level intent graph
|
|
62
|
+
├── workspace/ # manager.py, registry.py — global multi-project workspace
|
|
63
|
+
├── crossrepo/ # models.py, scanner.py, registry.py — cross-service deps
|
|
64
|
+
├── analytics/ # tracker.py, benchmark.py, feedback.py
|
|
65
|
+
├── intent/ # models.py, verifier.py, store.py
|
|
66
|
+
├── mcp/ # server.py (supports --auto multi-project mode)
|
|
60
67
|
└── cli/ # main.py
|
|
61
68
|
```
|
|
62
69
|
|
|
70
|
+
Outside `src/`: `skills/codebase-intel/SKILL.md` is the agent skill (portable frontmatter only:
|
|
71
|
+
name, description, license, compatibility). `CHANGELOG.md` records releases.
|
|
72
|
+
|
|
63
73
|
## Key Commands
|
|
64
74
|
- `ruff check src/ tests/` — Lint
|
|
65
75
|
- `ruff format src/ tests/` — Format
|
|
@@ -77,7 +87,23 @@ src/codebase_intel/
|
|
|
77
87
|
- Content hashing via xxhash for change detection
|
|
78
88
|
- ISO 8601 for all timestamps, UTC timezone
|
|
79
89
|
|
|
90
|
+
## Intent Graph (v2)
|
|
91
|
+
- Journal-first: `.codebase-intel/intent-journal/*.jsonl` is committed source of truth;
|
|
92
|
+
`intent-graph.db` is a derived, rebuildable index (git-ignored)
|
|
93
|
+
- Trust tiers: mined → derived → asserted (agent) → confirmed (human) — surfaced in every render
|
|
94
|
+
- MCP tools: record_why, check_precedent, bootstrap, get_intent
|
|
95
|
+
- CLI: why, intent-gate, install-hooks, intent-check, intent-confirm, intent-render,
|
|
96
|
+
intent-migrate, intent-rebuild, intent-eval
|
|
97
|
+
- Degradation ladder everywhere: intent graph → code graph → raw files, never hard-fail
|
|
98
|
+
- Eval harness (T-006): `codebase-intel intent-eval <repo...>` — token AND correctness
|
|
99
|
+
A/B (accuracy@1/@3, naive-vs-citation token reduction) vs the v1 baseline. See
|
|
100
|
+
docs/EVAL-RESULTS.md for methodology and this repo's self-hosted numbers.
|
|
101
|
+
- See docs/V2-PLAN.md (requirements/design) and docs/TASK-LEDGER.md (state)
|
|
102
|
+
|
|
80
103
|
## Current Focus
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
|
|
104
|
+
- v0.3.0 release prep (intent graph + agent skill) on `chore/release-0.3.0`; version is
|
|
105
|
+
single-sourced from `codebase_intel.__version__` via `[tool.hatch.version]`
|
|
106
|
+
(release = GitHub Release → `publish.yml` → PyPI)
|
|
107
|
+
- v2 intent graph: Phases 0–5 + eval harness shipped (see TASK-LEDGER)
|
|
108
|
+
- Next: eval harness needs 2–3 external production repos for a broader A/B (T-006
|
|
109
|
+
remains open for that), team layer depth, pre-existing coverage debt (T-008)
|
|
@@ -5,7 +5,7 @@ Thanks for wanting to help. Here's how to get started.
|
|
|
5
5
|
## Setup
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
git clone https://github.com/
|
|
8
|
+
git clone https://github.com/a-mutharasu/codebase-intel.git
|
|
9
9
|
cd codebase-intel
|
|
10
10
|
uv sync --dev # or: pip install -e ".[dev]"
|
|
11
11
|
```
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Handoff — codebase-intel v2 (Intent Graph)
|
|
2
|
+
|
|
3
|
+
Last updated: 2026-07-18 · Branch: `main` · For the next session (human or agent)
|
|
4
|
+
## Read this first
|
|
5
|
+
|
|
6
|
+
1. This file (5 min) — orientation and where things stand
|
|
7
|
+
2. `docs/V2-PLAN.md` — the requirements analysis and phased plan this work follows
|
|
8
|
+
3. `docs/TASK-LEDGER.md` — the authoritative, up-to-date task state (source of truth,
|
|
9
|
+
supersedes anything below if they disagree)
|
|
10
|
+
|
|
11
|
+
## What this is
|
|
12
|
+
|
|
13
|
+
`codebase-intel` v1 gives AI agents structured code-graph context, a decision journal,
|
|
14
|
+
and quality contracts. v2 (this work) adds an **intent graph**: a multi-level "why" layer
|
|
15
|
+
captured at decision time, so agents traverse recorded reasoning instead of re-reading
|
|
16
|
+
files and re-deciding things that were already decided. See `docs/V2-PLAN.md` for the
|
|
17
|
+
full functional/non-functional requirements and the resilience design.
|
|
18
|
+
|
|
19
|
+
## State right now
|
|
20
|
+
|
|
21
|
+
All of v2 Phases 0–5 are built, tested, and merged to `main`. Plus a chore pass that
|
|
22
|
+
eliminated all pre-existing v1 ruff/mypy debt. Concretely:
|
|
23
|
+
|
|
24
|
+
| Phase | What | Status |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| 0 | Intent graph foundation — journal-first store (JSONL truth + rebuildable SQLite index), trust tiers, v1→v2 migration | done |
|
|
27
|
+
| 1 | Capture loop — `record_why`, `check_precedent`, pre-commit gate, significance classifier | done |
|
|
28
|
+
| 2 | Traversal + session bootstrap with a mandatory degradation ladder | done |
|
|
29
|
+
| 3 | Honesty machinery — anchor repair/re-anchoring, staleness, conflicts, coverage | done |
|
|
30
|
+
| 5 | Human projection (Mermaid/HTML render) + review promotion (asserted→confirmed) | done |
|
|
31
|
+
| 4 (T-006) | Eval harness — token AND correctness A/B | **blocked**, see below |
|
|
32
|
+
| — (T-008) | v1 lint/type/coverage debt | ruff+mypy done; coverage gate still open |
|
|
33
|
+
|
|
34
|
+
913 tests passing, `ruff check`/`ruff format --check`/`mypy src/` all clean on `main`.
|
|
35
|
+
|
|
36
|
+
### What's genuinely unfinished
|
|
37
|
+
|
|
38
|
+
- **T-006 (eval harness) is blocked, not done.** The harness itself
|
|
39
|
+
(`analytics/eval.py`, CLI `codebase-intel intent-eval`) is code-complete and verified
|
|
40
|
+
end-to-end — it ran against this repo and produced real numbers
|
|
41
|
+
(`docs/EVAL-RESULTS.md`: 100% accuracy@1/@3, 99% token reduction, n=3 cases, self-hosted
|
|
42
|
+
only). The task's actual bar ("real repos," plural, vs v1 baseline) needs 2+ external
|
|
43
|
+
production repos. The CLI already accepts multiple paths
|
|
44
|
+
(`codebase-intel intent-eval repo-a repo-b repo-c`) — no more code is needed, just repos
|
|
45
|
+
to point it at. **This is the most concrete unblock a human can hand over.**
|
|
46
|
+
- **T-008 (v1 coverage debt) is in-progress.** `ruff` (222→0) and `mypy` (33→0) errors are
|
|
47
|
+
fully fixed. The `pytest` 90% coverage gate still fails (~45% project-wide) because large
|
|
48
|
+
v1 modules have zero dedicated unit tests: `mcp/server.py` (~5%), `graph/query.py` (0%),
|
|
49
|
+
`intent/*.py` (0%), `crossrepo/*.py` (0%), `decisions/miner.py` (0%). This is a
|
|
50
|
+
substantially larger effort (writing tests for existing untested v1 code) than the
|
|
51
|
+
lint/type fixes were — treat it as its own project, not a quick follow-on. Until it's
|
|
52
|
+
addressed, run tests with `pytest --no-cov` or expect the coverage gate to fail even
|
|
53
|
+
though every test passes.
|
|
54
|
+
|
|
55
|
+
## How to verify the repo is healthy
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
uv sync --extra dev
|
|
59
|
+
uv run ruff check src/ tests/ # should be clean
|
|
60
|
+
uv run ruff format --check src/ tests/ # should be clean
|
|
61
|
+
uv run mypy src/ # should be clean
|
|
62
|
+
uv run pytest --no-cov -q # 913 passed
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## How to explore what v2 built
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
codebase-intel why "<title>" "<reason>" -f <file> # record a why
|
|
69
|
+
codebase-intel intent-gate # pre-commit gate (also installable: install-hooks)
|
|
70
|
+
codebase-intel intent-check # anchor validation/repair report
|
|
71
|
+
codebase-intel intent-render -f html -o out.html # human-readable graph
|
|
72
|
+
codebase-intel intent-eval <repo...> # token+correctness eval (T-006)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Or via MCP tools: `record_why`, `check_precedent`, `bootstrap`, `get_intent`.
|
|
76
|
+
|
|
77
|
+
This repo dogfoods its own intent graph — `.codebase-intel/intent-journal/journal.jsonl`
|
|
78
|
+
is committed and has real entries from this session's own work (see git history on that
|
|
79
|
+
path). `docs/intent-graph.html` is a static render of it.
|
|
80
|
+
|
|
81
|
+
## Working conventions this session used (carry these forward)
|
|
82
|
+
|
|
83
|
+
- One feature branch per phase (`feature/v2-phaseN-...`), squash of work, merge
|
|
84
|
+
`--ff-only` to `main` after full verification (ruff + mypy + full test suite).
|
|
85
|
+
- `docs/TASK-LEDGER.md` is updated at claim-time (status → in-progress, owner, touched)
|
|
86
|
+
and at completion (status → done/blocked, a dated Decisions entry explaining what
|
|
87
|
+
passed/what didn't and why) — read it before trusting any status claim here, this file
|
|
88
|
+
is a snapshot and will go stale.
|
|
89
|
+
- Commits in this session were made **without** a Co-Authored-By trailer, per explicit
|
|
90
|
+
user instruction — continue that unless told otherwise.
|
|
91
|
+
- Don't mark a ledger task `done` if its literal Verify bar isn't met — T-006 is the
|
|
92
|
+
example: the harness works, but "done" would overclaim a multi-repo A/B that hasn't
|
|
93
|
+
happened yet. `blocked` was used instead, with what's built vs what's missing spelled
|
|
94
|
+
out.
|
|
95
|
+
|
|
96
|
+
## Suggested next steps (not mandated — use judgment)
|
|
97
|
+
|
|
98
|
+
1. If you have other repos handy: `codebase-intel init` in them, capture a few real
|
|
99
|
+
`why`s, then `codebase-intel intent-eval` across all of them for T-006's real bar.
|
|
100
|
+
2. Otherwise: pick up T-008's coverage debt, module by module (mcp/server.py and
|
|
101
|
+
graph/query.py are the biggest zero-coverage gaps).
|
|
102
|
+
3. Team-layer depth (multi-user review queues, ownership UI, access control) was
|
|
103
|
+
deliberately deferred in Phase 5 — `capture.promote()` + owner metadata is the seed if
|
|
104
|
+
that becomes a priority.
|