codegraph-engine 2.3.0__py3-none-any.whl → 3.0.0__py3-none-any.whl
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.
- codegraph/__init__.py +1 -1
- codegraph/agent_brain.py +172 -2
- codegraph/agent_capabilities.py +320 -3
- codegraph/agent_rules.py +1 -1
- codegraph/api_drift.py +455 -0
- codegraph/async_queue/__init__.py +50 -0
- codegraph/async_queue/detectors/__init__.py +48 -0
- codegraph/async_queue/detectors/celery.py +160 -0
- codegraph/async_queue/detectors/kafka.py +168 -0
- codegraph/async_queue/detectors/rabbitmq.py +116 -0
- codegraph/async_queue/detectors/redis.py +130 -0
- codegraph/async_queue/detectors/sqs.py +135 -0
- codegraph/async_queue/models.py +161 -0
- codegraph/async_queue/otel_models.py +74 -0
- codegraph/async_queue/otel_parser.py +337 -0
- codegraph/async_queue/reconciler.py +427 -0
- codegraph/async_queue/scanner.py +291 -0
- codegraph/async_queue/traversal.py +447 -0
- codegraph/change_impact.py +320 -110
- codegraph/cli.py +776 -25
- codegraph/cli_output.py +17 -2
- codegraph/context.py +38 -11
- codegraph/context_freshness.py +2 -0
- codegraph/database/__init__.py +14 -0
- codegraph/database/extractor.py +712 -17
- codegraph/database/interrogation.py +388 -2
- codegraph/database/schema_drift.py +862 -0
- codegraph/epistemic.py +7 -0
- codegraph/evidence_contract.py +21 -0
- codegraph/frameworks.py +171 -6
- codegraph/frameworks_nestjs.py +502 -0
- codegraph/frameworks_nextjs.py +337 -0
- codegraph/frameworks_react.py +457 -0
- codegraph/freshness.py +2 -0
- codegraph/frontend_html.py +109 -0
- codegraph/git.py +2 -0
- codegraph/git_state.py +2 -0
- codegraph/indexing/__init__.py +7 -1
- codegraph/indexing/indexer.py +291 -38
- codegraph/indexing/models.py +6 -0
- codegraph/indexing/parser.py +239 -0
- codegraph/indexing/pool.py +136 -0
- codegraph/indexing/scanner.py +6 -0
- codegraph/indexing/templates.py +418 -0
- codegraph/interrogation.py +128 -20
- codegraph/mcp/server.py +190 -28
- codegraph/models.py +7 -0
- codegraph/monorepo.py +3 -0
- codegraph/optimizer.py +42 -5
- codegraph/process_lifecycle.py +31 -13
- codegraph/refactor/__init__.py +36 -0
- codegraph/refactor/models.py +114 -0
- codegraph/refactor/renamer.py +844 -0
- codegraph/refactor/transactions.py +403 -0
- codegraph/resolver.py +1202 -159
- codegraph/retrieval_policy.py +6 -0
- codegraph/route_topology.py +172 -0
- codegraph/runtime/__init__.py +19 -0
- codegraph/runtime/collector.py +155 -0
- codegraph/runtime/db_watcher.py +191 -0
- codegraph/runtime/ingestor.py +30 -10
- codegraph/runtime/port_inspector.py +304 -0
- codegraph/runtime/runner.py +155 -6
- codegraph/runtime/trace_linker.py +175 -0
- codegraph/search/hybrid.py +26 -0
- codegraph/semantic_decorators.py +34 -3
- codegraph/structural_diff.py +2 -0
- codegraph/styles.py +144 -0
- codegraph/symbol_history.py +2 -0
- codegraph/tsconfig.py +236 -0
- codegraph/ui/__init__.py +6 -0
- codegraph/ui/server.py +715 -0
- codegraph/watcher.py +323 -0
- {codegraph_engine-2.3.0.dist-info → codegraph_engine-3.0.0.dist-info}/METADATA +150 -38
- codegraph_engine-3.0.0.dist-info/RECORD +129 -0
- codegraph_engine-2.3.0.dist-info/RECORD +0 -94
- {codegraph_engine-2.3.0.dist-info → codegraph_engine-3.0.0.dist-info}/WHEEL +0 -0
- {codegraph_engine-2.3.0.dist-info → codegraph_engine-3.0.0.dist-info}/entry_points.txt +0 -0
- {codegraph_engine-2.3.0.dist-info → codegraph_engine-3.0.0.dist-info}/licenses/LICENSE +0 -0
- {codegraph_engine-2.3.0.dist-info → codegraph_engine-3.0.0.dist-info}/top_level.txt +0 -0
codegraph/__init__.py
CHANGED
codegraph/agent_brain.py
CHANGED
|
@@ -644,6 +644,176 @@ RELATIONSHIP_SEMANTICS_REGISTRY: dict[str, RelationshipSemanticsSpec] = {
|
|
|
644
644
|
common_tool="get_db_schema / get_context",
|
|
645
645
|
example="`src/config.py` -> `READS_ENV` (`AST_VERIFIED`) -> `env:DATABASE_URL`",
|
|
646
646
|
),
|
|
647
|
+
"RENDERS": RelationshipSemanticsSpec(
|
|
648
|
+
relationship="RENDERS",
|
|
649
|
+
meaning="React JSX component renders a child component element (`<ChildComponent ... />`).",
|
|
650
|
+
typical_source="Parent component symbol (`DashboardPage`, `InvoiceTable`)",
|
|
651
|
+
typical_target="Child component symbol (`InvoiceCard`, `Button`)",
|
|
652
|
+
proves="Static JSX component composition tree hierarchy.",
|
|
653
|
+
does_not_prove="Does not prove conditional branch execution at runtime unless inspected.",
|
|
654
|
+
common_tool="find_callers / find_callees / get_references",
|
|
655
|
+
example="`Dashboard` -> `RENDERS` (`AST_VERIFIED`) -> `InvoiceTable`",
|
|
656
|
+
),
|
|
657
|
+
"USES_HOOK": RelationshipSemanticsSpec(
|
|
658
|
+
relationship="USES_HOOK",
|
|
659
|
+
meaning="React component or custom hook calls a state/lifecycle hook (`useAuth()`, `useInvoices()`).",
|
|
660
|
+
typical_source="Component or custom hook (`UserProfile`, `useOrderDetails`)",
|
|
661
|
+
typical_target="Hook function symbol (`useAuth`, `useQuery`)",
|
|
662
|
+
proves="Component or custom hook lifecycle dependency on target hook.",
|
|
663
|
+
does_not_prove="Does not prove hook return value shape without inspecting hook definition.",
|
|
664
|
+
common_tool="find_callers / get_references / trace_path",
|
|
665
|
+
example="`UserProfile` -> `USES_HOOK` (`FRAMEWORK_VERIFIED`) -> `useAuth`",
|
|
666
|
+
),
|
|
667
|
+
"IMPORTS_STYLE": RelationshipSemanticsSpec(
|
|
668
|
+
relationship="IMPORTS_STYLE",
|
|
669
|
+
meaning="Component or module imports a CSS/SCSS stylesheet or CSS module (`import styles from './Button.module.css'`).",
|
|
670
|
+
typical_source="Component or page file (`Button.tsx`)",
|
|
671
|
+
typical_target="Stylesheet file (`Button.module.css`, `globals.css`)",
|
|
672
|
+
proves="Component imports style definitions from target stylesheet.",
|
|
673
|
+
does_not_prove="Does not prove all style classes in the file are actively applied.",
|
|
674
|
+
common_tool="find_references / get_file / get_context",
|
|
675
|
+
example="`Button.tsx` -> `IMPORTS_STYLE` (`AST_VERIFIED`) -> `Button.module.css`",
|
|
676
|
+
),
|
|
677
|
+
"USES_STYLE_CLASS": RelationshipSemanticsSpec(
|
|
678
|
+
relationship="USES_STYLE_CLASS",
|
|
679
|
+
meaning="JSX element or component references a CSS class selector (`className={styles.header}` or `className='btn-primary'`).",
|
|
680
|
+
typical_source="Component or JSX element (`Header.tsx`)",
|
|
681
|
+
typical_target="CSS class symbol (`.header-title`, `.btn-primary`)",
|
|
682
|
+
proves="Component applies the named CSS style class.",
|
|
683
|
+
does_not_prove="Does not prove CSS specificity or cascade overrides.",
|
|
684
|
+
common_tool="find_references / search_code / get_context",
|
|
685
|
+
example="`Header.tsx` -> `USES_STYLE_CLASS` (`FRAMEWORK_VERIFIED`) -> `.header-title`",
|
|
686
|
+
),
|
|
687
|
+
"FETCHES_ROUTE": RelationshipSemanticsSpec(
|
|
688
|
+
relationship="FETCHES_ROUTE",
|
|
689
|
+
meaning="Frontend component, hook, or API client invokes a backend HTTP route (`fetch('/api/v1/invoices')`, `axios.get(...)`).",
|
|
690
|
+
typical_source="Frontend component or data hook (`useInvoices`, `createInvoiceForm`)",
|
|
691
|
+
typical_target="Backend route endpoint (`POST /api/v1/invoices`, `GET /api/v1/users`)",
|
|
692
|
+
proves="Frontend client-side network request targeting a backend route.",
|
|
693
|
+
does_not_prove="Does not prove backend server availability at runtime.",
|
|
694
|
+
common_tool="find_callers / trace_path / list_routes",
|
|
695
|
+
example="`useInvoices` -> `FETCHES_ROUTE` (`FRAMEWORK_VERIFIED`) -> `GET /api/v1/invoices`",
|
|
696
|
+
),
|
|
697
|
+
"LOADS_SCRIPT": RelationshipSemanticsSpec(
|
|
698
|
+
relationship="LOADS_SCRIPT",
|
|
699
|
+
meaning="HTML template or page loads a JavaScript/TypeScript script bundle (`<script src='...'>`).",
|
|
700
|
+
typical_source="HTML file (`index.html`)",
|
|
701
|
+
typical_target="Script file (`src/main.tsx`, `bundle.js`)",
|
|
702
|
+
proves="HTML document includes and executes target script.",
|
|
703
|
+
does_not_prove="Does not prove script execution order if async/defer are used.",
|
|
704
|
+
common_tool="find_references / get_file",
|
|
705
|
+
example="`index.html` -> `LOADS_SCRIPT` (`STATIC_VERIFIED`) -> `src/main.tsx`",
|
|
706
|
+
),
|
|
707
|
+
"LOADS_STYLESHEET": RelationshipSemanticsSpec(
|
|
708
|
+
relationship="LOADS_STYLESHEET",
|
|
709
|
+
meaning="HTML template or page loads an external stylesheet (`<link rel='stylesheet' href='...'>`).",
|
|
710
|
+
typical_source="HTML file (`index.html`)",
|
|
711
|
+
typical_target="Stylesheet file (`src/index.css`, `theme.css`)",
|
|
712
|
+
proves="HTML document links target stylesheet for presentation.",
|
|
713
|
+
does_not_prove="Does not prove runtime CDN stylesheet availability.",
|
|
714
|
+
common_tool="find_references / get_file",
|
|
715
|
+
example="`index.html` -> `LOADS_STYLESHEET` (`STATIC_VERIFIED`) -> `src/index.css`",
|
|
716
|
+
),
|
|
717
|
+
"MAPS_TO_COLLECTION": RelationshipSemanticsSpec(
|
|
718
|
+
relationship="MAPS_TO_COLLECTION",
|
|
719
|
+
meaning="NoSQL document model (Mongoose model) maps to an underlying MongoDB collection.",
|
|
720
|
+
typical_source="Mongoose model (`InvoiceModel`)",
|
|
721
|
+
typical_target="MongoDB collection (`invoices`)",
|
|
722
|
+
proves="Static mapping between document model and database collection.",
|
|
723
|
+
does_not_prove="Does not prove database schema strictness unless validation options are inspected.",
|
|
724
|
+
common_tool="find_db_tables / find_db_models / get_db_table",
|
|
725
|
+
example="`InvoiceModel` -> `MAPS_TO_COLLECTION` (`FRAMEWORK_VERIFIED`) -> `db.UNKNOWN.UNKNOWN.invoices`",
|
|
726
|
+
),
|
|
727
|
+
"WRITES_COLLECTION": RelationshipSemanticsSpec(
|
|
728
|
+
relationship="WRITES_COLLECTION",
|
|
729
|
+
meaning="Function or route writes (insert, update, delete) documents to a MongoDB collection.",
|
|
730
|
+
typical_source="Caller symbol or API handler (`createInvoice`)",
|
|
731
|
+
typical_target="MongoDB collection (`invoices`)",
|
|
732
|
+
proves="Write operation (`Model.create`, `Model.updateOne`, `insertOne`) against target collection.",
|
|
733
|
+
does_not_prove="Does not prove transaction commit or replica-set write concern acknowledgment.",
|
|
734
|
+
common_tool="find_db_writers / get_context / trace_path",
|
|
735
|
+
example="`createInvoice` -> `WRITES_COLLECTION` (`AST_VERIFIED`) -> `db.UNKNOWN.UNKNOWN.invoices`",
|
|
736
|
+
),
|
|
737
|
+
"READS_COLLECTION": RelationshipSemanticsSpec(
|
|
738
|
+
relationship="READS_COLLECTION",
|
|
739
|
+
meaning="Function or route reads (find, aggregate, count) documents from a MongoDB collection.",
|
|
740
|
+
typical_source="Caller symbol or API handler (`listInvoices`)",
|
|
741
|
+
typical_target="MongoDB collection (`invoices`)",
|
|
742
|
+
proves="Read query (`Model.find`, `Model.findOne`, `aggregate`) against target collection.",
|
|
743
|
+
does_not_prove="Does not prove document existence at runtime.",
|
|
744
|
+
common_tool="find_db_readers / get_context / trace_path",
|
|
745
|
+
example="`listInvoices` -> `READS_COLLECTION` (`AST_VERIFIED`) -> `db.UNKNOWN.UNKNOWN.invoices`",
|
|
746
|
+
),
|
|
747
|
+
"DISPATCHES_TASK": RelationshipSemanticsSpec(
|
|
748
|
+
relationship="DISPATCHES_TASK",
|
|
749
|
+
meaning="Caller function or route dispatches a background task (.delay(), .apply_async(), .send_task()).",
|
|
750
|
+
typical_source="Caller symbol or API handler (`checkout_order`, `register_user`)",
|
|
751
|
+
typical_target="Task handler function (`process_order_payment`, `send_welcome_email`)",
|
|
752
|
+
proves="Background task invocation connects caller to the queued task handler.",
|
|
753
|
+
does_not_prove="Does not prove queue worker status or job execution timing.",
|
|
754
|
+
common_tool="trace_path / find_callees / get_context",
|
|
755
|
+
example="`checkout_order` -> `DISPATCHES_TASK` (`FRAMEWORK_VERIFIED`) -> `process_order_payment`",
|
|
756
|
+
),
|
|
757
|
+
"TRIGGERS_SIGNAL": RelationshipSemanticsSpec(
|
|
758
|
+
relationship="TRIGGERS_SIGNAL",
|
|
759
|
+
meaning="Model lifecycle action (save, delete) or signal emission triggers a signal receiver.",
|
|
760
|
+
typical_source="Model or lifecycle method (`Customer.save`, `signal.send`)",
|
|
761
|
+
typical_target="Signal receiver function (`on_customer_created`)",
|
|
762
|
+
proves="Django signal linkage connects the model or trigger site to registered receivers.",
|
|
763
|
+
does_not_prove="Does not prove transaction commit before receiver execution.",
|
|
764
|
+
common_tool="trace_path / find_callees / get_context",
|
|
765
|
+
example="`Customer.save` -> `TRIGGERS_SIGNAL` (`FRAMEWORK_VERIFIED`) -> `on_customer_created`",
|
|
766
|
+
),
|
|
767
|
+
"HANDLES_SIGNAL": RelationshipSemanticsSpec(
|
|
768
|
+
relationship="HANDLES_SIGNAL",
|
|
769
|
+
meaning="Signal receiver function handles lifecycle events or domain signals from a sender model.",
|
|
770
|
+
typical_source="Receiver function (`on_customer_created`)",
|
|
771
|
+
typical_target="Sender model symbol (`Customer`)",
|
|
772
|
+
proves="Receiver function is bound to the sender model via @receiver or signal.connect.",
|
|
773
|
+
does_not_prove="Does not prove receiver handles all signal kwargs.",
|
|
774
|
+
common_tool="find_callers / get_references / get_context",
|
|
775
|
+
example="`on_customer_created` -> `HANDLES_SIGNAL` (`FRAMEWORK_VERIFIED`) -> `Customer`",
|
|
776
|
+
),
|
|
777
|
+
"RENDERS_TEMPLATE": RelationshipSemanticsSpec(
|
|
778
|
+
relationship="RENDERS_TEMPLATE",
|
|
779
|
+
meaning="View or controller renders an HTML or Jinja template (render_template, TemplateResponse, template_name).",
|
|
780
|
+
typical_source="View handler symbol (`dashboard_view`)",
|
|
781
|
+
typical_target="Template file path (`templates/dashboard.html`)",
|
|
782
|
+
proves="Deterministic linkage between backend view function and frontend HTML template.",
|
|
783
|
+
does_not_prove="Does not prove all template context variables are provided.",
|
|
784
|
+
common_tool="list_routes / get_context / find_callees",
|
|
785
|
+
example="`dashboard_view` -> `RENDERS_TEMPLATE` (`FRAMEWORK_VERIFIED`) -> `templates/dashboard.html`",
|
|
786
|
+
),
|
|
787
|
+
"DISPATCHES_FORWARD": RelationshipSemanticsSpec(
|
|
788
|
+
relationship="DISPATCHES_FORWARD",
|
|
789
|
+
meaning="Neural network module invocation (model(inputs), self.submodule(x)) dispatches to nn.Module.forward().",
|
|
790
|
+
typical_source="Caller function or model forward pass (`predict`, `Classifier.forward`)",
|
|
791
|
+
typical_target="Submodule or model forward method (`Encoder.forward`, `Linear.forward`)",
|
|
792
|
+
proves="PyTorch __call__ dispatch to forward method on a concrete or resolved module instance.",
|
|
793
|
+
does_not_prove="Does not prove runtime execution if forward hooks or dynamic wrappers abort execution.",
|
|
794
|
+
common_tool="trace_path / find_callees / get_context",
|
|
795
|
+
example="`predict` -> `DISPATCHES_FORWARD` (`AST_VERIFIED`) -> `Classifier.forward`",
|
|
796
|
+
),
|
|
797
|
+
"TOOL_HANDLER": RelationshipSemanticsSpec(
|
|
798
|
+
relationship="TOOL_HANDLER",
|
|
799
|
+
meaning="Function or method is decorated as an agentic AI tool (@tool, @function_tool, @agent).",
|
|
800
|
+
typical_source="Tool function (`search_web_tool`, `execute_sql`)",
|
|
801
|
+
typical_target="Agent framework registration decorator (`@tool`)",
|
|
802
|
+
proves="Function is registered as a callable tool in an agentic workflow.",
|
|
803
|
+
does_not_prove="Does not prove tool argument schema compatibility with LLM runtime.",
|
|
804
|
+
common_tool="find_references / get_symbol / get_context",
|
|
805
|
+
example="`search_web_tool` -> `TOOL_HANDLER` (`FRAMEWORK_VERIFIED`) -> `@tool`",
|
|
806
|
+
),
|
|
807
|
+
"PIPELINE_STEP": RelationshipSemanticsSpec(
|
|
808
|
+
relationship="PIPELINE_STEP",
|
|
809
|
+
meaning="Sequential execution link in an AI/ML pipeline or LangChain LCEL chain (prompt | llm | parser).",
|
|
810
|
+
typical_source="Upstream pipeline component or prompt template (`prompt_template`)",
|
|
811
|
+
typical_target="Downstream pipeline component or model runner (`chat_model`)",
|
|
812
|
+
proves="Dataflow pipe composition between execution steps in an AI/ML workflow.",
|
|
813
|
+
does_not_prove="Does not prove runtime type convergence between pipe boundaries.",
|
|
814
|
+
common_tool="trace_path / find_callees / get_context",
|
|
815
|
+
example="`prompt_template` -> `PIPELINE_STEP` (`DATAFLOW_VERIFIED`) -> `chat_model`",
|
|
816
|
+
),
|
|
647
817
|
}
|
|
648
818
|
|
|
649
819
|
|
|
@@ -1248,7 +1418,7 @@ CodeGraph enforces nine canonical `evidence_class` values defined in `ALLOWED_EV
|
|
|
1248
1418
|
|
|
1249
1419
|
## 5. Relationship Model
|
|
1250
1420
|
|
|
1251
|
-
CodeGraph enforces the
|
|
1421
|
+
CodeGraph enforces the {len(ALLOWED_RELATIONSHIP_EVIDENCE_MATRIX)} canonical relationship types in `ALLOWED_RELATIONSHIP_EVIDENCE_MATRIX`. It **never** collapses framework routing, database operations, registry registration, or dependency injection into generic `CALLS` or `DEPENDS_ON`.
|
|
1252
1422
|
|
|
1253
1423
|
{relationships_block}
|
|
1254
1424
|
|
|
@@ -1547,7 +1717,7 @@ Repository -> Candidate Facts -> Task-Aware Filtering (RetrievalPolicy)
|
|
|
1547
1717
|
|
|
1548
1718
|
- **Hard Invariants & Output Boundaries of `get_context`**:
|
|
1549
1719
|
- Primary input is `query` (`task` is also supported as a string or `TaskSpec` dict alias).
|
|
1550
|
-
- Enforces strict output boundaries BEFORE MCP serialization: `max_tokens` (default `4000`, hard cap `20000`), `max_files` (default `
|
|
1720
|
+
- Enforces strict output boundaries BEFORE MCP serialization: `max_tokens` (default `4000`, hard cap `20000`), `max_files` (default `25`, hard cap `40`), and `max_lines` (default `500`, hard cap `1500`).
|
|
1551
1721
|
- Returns explicit budget metadata: `selected_tokens`, `candidate_tokens`, `selected_files`, `selected_lines`, `coverage_score`, and `truncated`.
|
|
1552
1722
|
- Preserves `unknowns` and `ambiguities` explicitly—never drops uncertainty to save tokens.
|
|
1553
1723
|
- Compresses duplicate `(source, target, relationship)` edges into a single record with `occurrence_count` and `supporting_locations`.
|
codegraph/agent_capabilities.py
CHANGED
|
@@ -158,6 +158,8 @@ ROUTING_MANIFEST: dict[str, str] = {
|
|
|
158
158
|
"context_freshness": "check_context_freshness",
|
|
159
159
|
"symbol_history": "trace_symbol_history",
|
|
160
160
|
"semantic_conflicts": "detect_semantic_conflicts",
|
|
161
|
+
"safe_rename": "safe_rename",
|
|
162
|
+
"rollback_refactor": "rollback_refactor",
|
|
161
163
|
}
|
|
162
164
|
|
|
163
165
|
DEFAULT_AGENT_PROFILE_TOOLS: tuple[str, ...] = (
|
|
@@ -736,7 +738,7 @@ TOOL_CAPABILITY_REGISTRY: tuple[ToolCapabilitySpec, ...] = (
|
|
|
736
738
|
description=(
|
|
737
739
|
"Compile a token-bounded, coverage-optimized ContextPacket containing verified symbols, compressed relationships, routes, DI providers, packages, and related tests. "
|
|
738
740
|
"Primary input: `query` (natural-language question, symbol, or task description; `task` is also supported as a compatibility alias for string or structured TaskSpec dict). "
|
|
739
|
-
"Budget controls: `max_tokens` (default 4000, hard cap 20000), `max_files` (default
|
|
741
|
+
"Budget controls: `max_tokens` (default 4000, hard cap 20000), `max_files` (default 25, hard cap 40), `max_lines` (default 500, hard cap 1500). "
|
|
740
742
|
"Preserves UNKNOWN, POSSIBLE, and AMBIGUOUS states explicitly. "
|
|
741
743
|
"Does not return full raw files; use targeted get_file or read_file only if exact omitted lines are needed afterward."
|
|
742
744
|
),
|
|
@@ -790,7 +792,7 @@ TOOL_CAPABILITY_REGISTRY: tuple[ToolCapabilitySpec, ...] = (
|
|
|
790
792
|
),
|
|
791
793
|
profiles=("agent", "graph", "minimal", "developer", "full"),
|
|
792
794
|
minimal_invocation='get_context(query="Debug authentication failure in login_endpoint")',
|
|
793
|
-
advanced_invocation='get_context(query="Trace DI chain for get_current_user", intent="DEBUG", max_tokens=4000, max_files=
|
|
795
|
+
advanced_invocation='get_context(query="Trace DI chain for get_current_user", intent="DEBUG", max_tokens=4000, max_files=25, max_lines=500, explain=True)',
|
|
794
796
|
result_fields=("symbols", "relationships", "routes", "tests", "packages", "unknowns", "conflicts", "uncertainties", "freshness", "selected_tokens", "candidate_tokens", "selected_files", "selected_lines", "coverage_score", "truncated", "candidate_token_estimate", "selected_token_estimate", "context_reduction_pct", "coverage"),
|
|
795
797
|
typical_followup="get_file on specific line ranges if implementation details outside snippets are required",
|
|
796
798
|
common_mistakes=(
|
|
@@ -2625,6 +2627,313 @@ TOOL_CAPABILITY_REGISTRY: tuple[ToolCapabilitySpec, ...] = (
|
|
|
2625
2627
|
example_call='detect_semantic_conflicts(base_branch="main", head_branch="HEAD")',
|
|
2626
2628
|
example_interpretation="Inspect has_conflicts and conflicts list for DELETED_SYMBOL_REFERENCED or CALL_SIGNATURE_MISMATCH.",
|
|
2627
2629
|
),
|
|
2630
|
+
# 49. safe_rename
|
|
2631
|
+
ToolCapabilitySpec(
|
|
2632
|
+
tool_name="safe_rename",
|
|
2633
|
+
capability="ast_symbol_refactor",
|
|
2634
|
+
description=(
|
|
2635
|
+
"Perform a deterministic, syntax-validated, transaction-safe AST rename of a symbol across the repository. "
|
|
2636
|
+
"Use when renaming a function, method, or class across multiple files safely with in-memory preview diffs. "
|
|
2637
|
+
"Does not prove runtime equivalence beyond AST syntax validation and statically verified references."
|
|
2638
|
+
),
|
|
2639
|
+
task_types=(
|
|
2640
|
+
AgentTaskCategory.CHANGE_IMPACT.value,
|
|
2641
|
+
),
|
|
2642
|
+
required_inputs=("target", "new_name"),
|
|
2643
|
+
optional_inputs=("dry_run", "force_uncertain"),
|
|
2644
|
+
expected_output_type="RefactorResult",
|
|
2645
|
+
relationship_types_returned=("DEFINES", "CALLS", "IMPORTS"),
|
|
2646
|
+
evidence_guarantees="Token-exact replacement with in-memory ast.parse syntax validation and atomic rollback manifest.",
|
|
2647
|
+
does_not_prove="Does not prove semantic preservation beyond AST syntax validation and statically verified references.",
|
|
2648
|
+
useful_situations=(
|
|
2649
|
+
"Renaming a function, method, or class safely across multiple files without breaking references",
|
|
2650
|
+
"Previewing exact diffs before executing an atomic codebase refactoring",
|
|
2651
|
+
),
|
|
2652
|
+
avoid_when=(
|
|
2653
|
+
"Trivial single-file edit of a local variable inside an already-open function",
|
|
2654
|
+
),
|
|
2655
|
+
profiles=("full",),
|
|
2656
|
+
minimal_invocation='safe_rename(target="AuthService", new_name="AuthenticationService", dry_run=True)',
|
|
2657
|
+
advanced_invocation='safe_rename(target="AuthService.verify", new_name="verify_token", dry_run=False, force_uncertain=False)',
|
|
2658
|
+
result_fields=("status", "target_symbol", "new_name", "risk", "files_changed", "spans_count", "diffs", "rollback_id", "errors"),
|
|
2659
|
+
typical_followup="rollback_refactor if undo needed, or find_tests to run affected test suite",
|
|
2660
|
+
common_mistakes=(
|
|
2661
|
+
"Applying without inspecting preview diffs when dry_run=True",
|
|
2662
|
+
"Using invalid Python identifiers with spaces or keywords",
|
|
2663
|
+
),
|
|
2664
|
+
example_request="Rename AuthService to AuthenticationService and preview all diffs.",
|
|
2665
|
+
example_call='safe_rename(target="AuthService", new_name="AuthenticationService", dry_run=True)',
|
|
2666
|
+
example_interpretation="Inspect status=='READY', diffs, risk=='LOW', and affected_tests before applying.",
|
|
2667
|
+
),
|
|
2668
|
+
# 50. rollback_refactor
|
|
2669
|
+
ToolCapabilitySpec(
|
|
2670
|
+
tool_name="rollback_refactor",
|
|
2671
|
+
capability="refactor_transaction_rollback",
|
|
2672
|
+
description=(
|
|
2673
|
+
"Atomically rollback an applied refactoring transaction using its rollback manifest ID. "
|
|
2674
|
+
"Use when reverting an applied refactoring transaction to restore original source files cleanly. "
|
|
2675
|
+
"Does not restore files if they were modified externally after refactoring was applied."
|
|
2676
|
+
),
|
|
2677
|
+
task_types=(
|
|
2678
|
+
AgentTaskCategory.CHANGE_IMPACT.value,
|
|
2679
|
+
),
|
|
2680
|
+
required_inputs=("transaction_id",),
|
|
2681
|
+
optional_inputs=(),
|
|
2682
|
+
expected_output_type="RefactorResult",
|
|
2683
|
+
relationship_types_returned=(),
|
|
2684
|
+
evidence_guarantees="Precondition SHA-256 validation and atomic file replacement with os.replace.",
|
|
2685
|
+
does_not_prove="Cannot rollback if files were modified externally after refactoring was applied.",
|
|
2686
|
+
useful_situations=(
|
|
2687
|
+
"Undoing an applied refactoring transaction cleanly to restore original code bytes",
|
|
2688
|
+
),
|
|
2689
|
+
avoid_when=(
|
|
2690
|
+
"Transaction was not applied or files have subsequent manual edits",
|
|
2691
|
+
),
|
|
2692
|
+
profiles=("full",),
|
|
2693
|
+
minimal_invocation='rollback_refactor(transaction_id="rf_abc123")',
|
|
2694
|
+
advanced_invocation='rollback_refactor(transaction_id="rf_abc123")',
|
|
2695
|
+
result_fields=("status", "target_symbol", "new_name", "files_changed", "rollback_id", "errors"),
|
|
2696
|
+
typical_followup="get_repository_status to verify repository state",
|
|
2697
|
+
common_mistakes=(
|
|
2698
|
+
"Calling rollback after modifying the files externally (which blocks rollback for safety)",
|
|
2699
|
+
),
|
|
2700
|
+
example_request="Undo the refactor with transaction ID rf_12345.",
|
|
2701
|
+
example_call='rollback_refactor(transaction_id="rf_12345")',
|
|
2702
|
+
example_interpretation="Inspect status=='ROLLED_BACK' and files_changed.",
|
|
2703
|
+
),
|
|
2704
|
+
# 65. get_live_services
|
|
2705
|
+
ToolCapabilitySpec(
|
|
2706
|
+
tool_name="get_live_services",
|
|
2707
|
+
capability="live_service_discovery",
|
|
2708
|
+
description=(
|
|
2709
|
+
"Detect and attribute active localhost services, ports, PIDs, frameworks, and workspace sub-packages with zero idle CPU. "
|
|
2710
|
+
"Use when diagnosing running dev servers or multi-service architectures. "
|
|
2711
|
+
"Does not prove live HTTP response payloads or application layer health."
|
|
2712
|
+
),
|
|
2713
|
+
task_types=(
|
|
2714
|
+
AgentTaskCategory.DIAGNOSTIC.value,
|
|
2715
|
+
AgentTaskCategory.DEBUG.value,
|
|
2716
|
+
AgentTaskCategory.ARCHITECTURE.value,
|
|
2717
|
+
),
|
|
2718
|
+
required_inputs=(),
|
|
2719
|
+
optional_inputs=(),
|
|
2720
|
+
expected_output_type="dict[str, Any]",
|
|
2721
|
+
relationship_types_returned=(),
|
|
2722
|
+
evidence_guarantees="Kernel socket table inspection and static configuration discovery with 5-second TTL cache.",
|
|
2723
|
+
does_not_prove="Does not prove live HTTP response payloads or application layer health.",
|
|
2724
|
+
useful_situations=(
|
|
2725
|
+
"Identifying running backend and frontend dev servers",
|
|
2726
|
+
"Attributing localhost ports to workspace sub-directories",
|
|
2727
|
+
),
|
|
2728
|
+
avoid_when=(
|
|
2729
|
+
"Dev servers are not running or only static AST analysis is required",
|
|
2730
|
+
),
|
|
2731
|
+
profiles=("full",),
|
|
2732
|
+
minimal_invocation="get_live_services()",
|
|
2733
|
+
advanced_invocation="get_live_services()",
|
|
2734
|
+
result_fields=("live_services", "configured_services", "count"),
|
|
2735
|
+
typical_followup="get_distributed_trace or list_routes",
|
|
2736
|
+
common_mistakes=(
|
|
2737
|
+
"Polling get_live_services in a rapid spin loop instead of relying on the 5-second TTL cache",
|
|
2738
|
+
),
|
|
2739
|
+
example_request="What dev servers are running on localhost?",
|
|
2740
|
+
example_call="get_live_services()",
|
|
2741
|
+
example_interpretation="Inspect live_services for active listening ports and PIDs.",
|
|
2742
|
+
),
|
|
2743
|
+
# 66. check_db_drift
|
|
2744
|
+
ToolCapabilitySpec(
|
|
2745
|
+
tool_name="check_db_drift",
|
|
2746
|
+
capability="database_schema_drift",
|
|
2747
|
+
description=(
|
|
2748
|
+
"Detect database schema drift between migration files, live database state, and code ORM models with zero idle CPU. "
|
|
2749
|
+
"Flags unmapped tables, missing columns, and migration version state. "
|
|
2750
|
+
"Use when verifying whether database migrations are up to date with code models. "
|
|
2751
|
+
"Does not execute SQL data assertions or validate column constraints against live row data."
|
|
2752
|
+
),
|
|
2753
|
+
task_types=(
|
|
2754
|
+
AgentTaskCategory.DEBUG.value,
|
|
2755
|
+
AgentTaskCategory.CHANGE_IMPACT.value,
|
|
2756
|
+
),
|
|
2757
|
+
required_inputs=(),
|
|
2758
|
+
optional_inputs=(),
|
|
2759
|
+
expected_output_type="dict[str, Any]",
|
|
2760
|
+
relationship_types_returned=(),
|
|
2761
|
+
evidence_guarantees="Comparison of SQLite/PostgreSQL schemas and migration folder state with 5-second TTL cache.",
|
|
2762
|
+
does_not_prove="Does not execute SQL data assertions or validate column constraints against live row data.",
|
|
2763
|
+
useful_situations=(
|
|
2764
|
+
"Verifying whether database migrations are up to date with code models",
|
|
2765
|
+
"Diagnosing missing table or column runtime errors",
|
|
2766
|
+
),
|
|
2767
|
+
avoid_when=(
|
|
2768
|
+
"Project does not utilize SQL databases or database models",
|
|
2769
|
+
),
|
|
2770
|
+
profiles=("full",),
|
|
2771
|
+
minimal_invocation="check_db_drift()",
|
|
2772
|
+
advanced_invocation="check_db_drift()",
|
|
2773
|
+
result_fields=("status", "unmapped_tables", "missing_columns", "migration_version", "is_drifted"),
|
|
2774
|
+
typical_followup="get_db_schema or find_db_tables",
|
|
2775
|
+
common_mistakes=(
|
|
2776
|
+
"Assuming check_db_drift executes database migrations rather than inspecting drift",
|
|
2777
|
+
),
|
|
2778
|
+
example_request="Check if our database schema has drifted from migrations.",
|
|
2779
|
+
example_call="check_db_drift()",
|
|
2780
|
+
example_interpretation="Check if is_drifted is true and review missing_columns.",
|
|
2781
|
+
),
|
|
2782
|
+
# 67. check_route_schema_drift
|
|
2783
|
+
ToolCapabilitySpec(
|
|
2784
|
+
tool_name="check_route_schema_drift",
|
|
2785
|
+
capability="route_schema_validation_drift",
|
|
2786
|
+
description=(
|
|
2787
|
+
"Use when detecting schema validation drift between a route/handler input schema (Pydantic BaseModel, Django Form, DRF Serializer) "
|
|
2788
|
+
"and destination database table columns. "
|
|
2789
|
+
"Flags MISSING_REQUIRED_COLUMN, NULLABILITY_MISMATCH, TYPE_INCOMPATIBILITY, LENGTH_CONSTRAINT_DRIFT, and UNUSED_SCHEMA_FIELD. "
|
|
2790
|
+
"Does not execute live requests."
|
|
2791
|
+
),
|
|
2792
|
+
task_types=(
|
|
2793
|
+
AgentTaskCategory.DEBUG.value,
|
|
2794
|
+
AgentTaskCategory.CHANGE_IMPACT.value,
|
|
2795
|
+
),
|
|
2796
|
+
required_inputs=(),
|
|
2797
|
+
optional_inputs=("route", "handler", "table", "schema"),
|
|
2798
|
+
expected_output_type="dict[str, Any]",
|
|
2799
|
+
relationship_types_returned=(),
|
|
2800
|
+
evidence_guarantees="Deterministic AST and database schema entity comparison.",
|
|
2801
|
+
does_not_prove="Does not execute live HTTP requests or live SQL transactions.",
|
|
2802
|
+
useful_situations=(
|
|
2803
|
+
"Validating route request payload models against destination database columns",
|
|
2804
|
+
"Preventing runtime NOT NULL constraint failures and type mismatches before deployment",
|
|
2805
|
+
),
|
|
2806
|
+
avoid_when=(
|
|
2807
|
+
"Inspecting static code symbols unrelated to HTTP routes or database persistence",
|
|
2808
|
+
),
|
|
2809
|
+
profiles=("full",),
|
|
2810
|
+
minimal_invocation='check_route_schema_drift(route="/api/v1/orders/checkout")',
|
|
2811
|
+
advanced_invocation='check_route_schema_drift(route="/api/v1/orders/checkout", table="orders", schema="CheckoutRequest")',
|
|
2812
|
+
result_fields=("status", "route_or_handler", "target_table", "schema_name", "drift_count", "critical_count", "warning_count", "info_count", "issues"),
|
|
2813
|
+
typical_followup="get_route_db_lineage or get_db_table",
|
|
2814
|
+
common_mistakes=(
|
|
2815
|
+
"Assuming check_route_schema_drift executes HTTP requests rather than inspecting static schemas",
|
|
2816
|
+
),
|
|
2817
|
+
example_request="Check for schema drift on our checkout route.",
|
|
2818
|
+
example_call='check_route_schema_drift(route="/api/v1/orders/checkout")',
|
|
2819
|
+
example_interpretation="Review issues for MISSING_REQUIRED_COLUMN or NULLABILITY_MISMATCH.",
|
|
2820
|
+
),
|
|
2821
|
+
# 68. get_distributed_trace
|
|
2822
|
+
ToolCapabilitySpec(
|
|
2823
|
+
tool_name="get_distributed_trace",
|
|
2824
|
+
capability="distributed_trace_reconstruction",
|
|
2825
|
+
description=(
|
|
2826
|
+
"Stitch and reconstruct multi-service distributed execution trees across frontend, backend, and database boundaries for a specific W3C trace ID. "
|
|
2827
|
+
"Use when tracing cross-service requests or debugging multi-service latency bottlenecks. "
|
|
2828
|
+
"Does not capture unobserved code paths or untraced sidecar requests."
|
|
2829
|
+
),
|
|
2830
|
+
task_types=(
|
|
2831
|
+
AgentTaskCategory.TRACE.value,
|
|
2832
|
+
AgentTaskCategory.DEBUG.value,
|
|
2833
|
+
),
|
|
2834
|
+
required_inputs=("trace_id",),
|
|
2835
|
+
optional_inputs=(),
|
|
2836
|
+
expected_output_type="dict[str, Any]",
|
|
2837
|
+
relationship_types_returned=(),
|
|
2838
|
+
evidence_guarantees="W3C traceparent stitching across multi-service runtime observations.",
|
|
2839
|
+
does_not_prove="Does not capture unobserved code paths or untraced sidecar requests.",
|
|
2840
|
+
useful_situations=(
|
|
2841
|
+
"Tracing an end-to-end user request from UI click to backend SQL execution",
|
|
2842
|
+
"Pinpointing which service failed in a distributed microservice workflow",
|
|
2843
|
+
),
|
|
2844
|
+
avoid_when=(
|
|
2845
|
+
"Static code traversal is sufficient or dev servers have not captured runtime traces",
|
|
2846
|
+
),
|
|
2847
|
+
profiles=("full",),
|
|
2848
|
+
minimal_invocation='get_distributed_trace(trace_id="4bf92f3577b34da6a3ce929d0e0e4736")',
|
|
2849
|
+
advanced_invocation='get_distributed_trace(trace_id="4bf92f3577b34da6a3ce929d0e0e4736")',
|
|
2850
|
+
result_fields=("trace_id", "status", "root_span", "total_spans", "services_involved", "timeline"),
|
|
2851
|
+
typical_followup="get_runtime_trace or reconcile_static_runtime",
|
|
2852
|
+
common_mistakes=(
|
|
2853
|
+
"Passing span_id instead of trace_id to get_distributed_trace",
|
|
2854
|
+
),
|
|
2855
|
+
example_request="Trace the distributed execution for trace ID 4bf92f3577b34da6a3ce929d0e0e4736.",
|
|
2856
|
+
example_call='get_distributed_trace(trace_id="4bf92f3577b34da6a3ce929d0e0e4736")',
|
|
2857
|
+
example_interpretation="Review timeline and services_involved to locate execution bottlenecks or failures.",
|
|
2858
|
+
),
|
|
2859
|
+
# 68. check_api_drift
|
|
2860
|
+
ToolCapabilitySpec(
|
|
2861
|
+
tool_name="check_api_drift",
|
|
2862
|
+
capability="client_server_api_drift",
|
|
2863
|
+
description=(
|
|
2864
|
+
"Detect client-server API contract drift between frontend fetch or axios calls and backend route registrations. "
|
|
2865
|
+
"Flags orphaned client endpoints (404s) and HTTP method mismatches (405s). "
|
|
2866
|
+
"Use when validating frontend API calls against backend endpoints before deployment. "
|
|
2867
|
+
"Does not execute live HTTP requests or validate dynamic URL strings constructed via runtime interpolation."
|
|
2868
|
+
),
|
|
2869
|
+
task_types=(
|
|
2870
|
+
AgentTaskCategory.ROUTE_DISCOVERY.value,
|
|
2871
|
+
AgentTaskCategory.CHANGE_IMPACT.value,
|
|
2872
|
+
AgentTaskCategory.DEBUG.value,
|
|
2873
|
+
),
|
|
2874
|
+
required_inputs=(),
|
|
2875
|
+
optional_inputs=(),
|
|
2876
|
+
expected_output_type="dict[str, Any]",
|
|
2877
|
+
relationship_types_returned=(),
|
|
2878
|
+
evidence_guarantees="Cross-layer AST static verification comparing frontend fetch calls with backend route trees.",
|
|
2879
|
+
does_not_prove="Does not execute live HTTP requests or validate dynamic URL concatenation at runtime.",
|
|
2880
|
+
useful_situations=(
|
|
2881
|
+
"Finding broken API endpoint paths in frontend client code",
|
|
2882
|
+
"Detecting HTTP method mismatches before deployment",
|
|
2883
|
+
),
|
|
2884
|
+
avoid_when=(
|
|
2885
|
+
"Frontend code does not use REST fetch/axios calls to backend routes",
|
|
2886
|
+
),
|
|
2887
|
+
profiles=("full",),
|
|
2888
|
+
minimal_invocation="check_api_drift()",
|
|
2889
|
+
advanced_invocation="check_api_drift()",
|
|
2890
|
+
result_fields=("status", "orphaned_client_routes", "method_mismatches", "verified_contracts_count"),
|
|
2891
|
+
typical_followup="find_routes or list_routes",
|
|
2892
|
+
common_mistakes=(
|
|
2893
|
+
"Assuming check_api_drift catches dynamic URL template literals constructed via arbitrary runtime string interpolation",
|
|
2894
|
+
),
|
|
2895
|
+
example_request="Check if any frontend API calls mismatch backend routes.",
|
|
2896
|
+
example_call="check_api_drift()",
|
|
2897
|
+
example_interpretation="Inspect orphaned_client_routes for potential 404s.",
|
|
2898
|
+
),
|
|
2899
|
+
# 69. get_monorepo_packages
|
|
2900
|
+
ToolCapabilitySpec(
|
|
2901
|
+
tool_name="get_monorepo_packages",
|
|
2902
|
+
capability="monorepo_package_discovery",
|
|
2903
|
+
description=(
|
|
2904
|
+
"Catalog monorepo workspace packages, tools (pnpm, Turborepo, npm/yarn workspaces), entry points, and inter-package dependencies. "
|
|
2905
|
+
"Use when mapping multi-package repository structure and package boundaries. "
|
|
2906
|
+
"Does not prove build system execution order or runtime dependency loading."
|
|
2907
|
+
),
|
|
2908
|
+
task_types=(
|
|
2909
|
+
AgentTaskCategory.PACKAGE.value,
|
|
2910
|
+
AgentTaskCategory.ARCHITECTURE.value,
|
|
2911
|
+
),
|
|
2912
|
+
required_inputs=(),
|
|
2913
|
+
optional_inputs=(),
|
|
2914
|
+
expected_output_type="dict[str, Any]",
|
|
2915
|
+
relationship_types_returned=(),
|
|
2916
|
+
evidence_guarantees="Deterministic workspace manifest analysis across pnpm, yarn, npm, Turborepo, Cargo, and Poetry.",
|
|
2917
|
+
does_not_prove="Does not prove build system execution order or runtime dependency loading.",
|
|
2918
|
+
useful_situations=(
|
|
2919
|
+
"Mapping multi-package repository structure and package boundaries",
|
|
2920
|
+
"Tracing internal dependency graph between workspace packages",
|
|
2921
|
+
),
|
|
2922
|
+
avoid_when=(
|
|
2923
|
+
"Repository is a single standalone package without workspaces",
|
|
2924
|
+
),
|
|
2925
|
+
profiles=("full",),
|
|
2926
|
+
minimal_invocation="get_monorepo_packages()",
|
|
2927
|
+
advanced_invocation="get_monorepo_packages()",
|
|
2928
|
+
result_fields=("tool", "packages", "dependency_graph", "root_path"),
|
|
2929
|
+
typical_followup="get_architecture or get_dependencies",
|
|
2930
|
+
common_mistakes=(
|
|
2931
|
+
"Expecting get_monorepo_packages to build or run package package.json scripts",
|
|
2932
|
+
),
|
|
2933
|
+
example_request="List all packages in this monorepo and their dependencies.",
|
|
2934
|
+
example_call="get_monorepo_packages()",
|
|
2935
|
+
example_interpretation="Inspect packages mapping to understand package names, root paths, and dependencies.",
|
|
2936
|
+
),
|
|
2628
2937
|
)
|
|
2629
2938
|
|
|
2630
2939
|
_TOOL_BY_NAME: dict[str, ToolCapabilitySpec] = {t.tool_name: t for t in TOOL_CAPABILITY_REGISTRY}
|
|
@@ -2931,12 +3240,15 @@ MCP_PROFILE_RECOMMENDATIONS: dict[str, dict[str, object]] = {
|
|
|
2931
3240
|
},
|
|
2932
3241
|
"full": {
|
|
2933
3242
|
"profile": "full",
|
|
2934
|
-
"tool_count":
|
|
3243
|
+
"tool_count": 70,
|
|
2935
3244
|
"recommended_for": "Complete diagnostic, database intelligence, runtime reconciliation, benchmark, and repository administration sessions",
|
|
2936
3245
|
"included_tools": [
|
|
2937
3246
|
"analyze_change_impact",
|
|
2938
3247
|
"analyze_impact",
|
|
3248
|
+
"check_api_drift",
|
|
2939
3249
|
"check_context_freshness",
|
|
3250
|
+
"check_db_drift",
|
|
3251
|
+
"check_route_schema_drift",
|
|
2940
3252
|
"compare_git",
|
|
2941
3253
|
"compile_task",
|
|
2942
3254
|
"detect_semantic_conflicts",
|
|
@@ -2967,6 +3279,7 @@ MCP_PROFILE_RECOMMENDATIONS: dict[str, dict[str, object]] = {
|
|
|
2967
3279
|
"get_dependencies",
|
|
2968
3280
|
"get_dependency_graph",
|
|
2969
3281
|
"get_dependents",
|
|
3282
|
+
"get_distributed_trace",
|
|
2970
3283
|
"get_evidence",
|
|
2971
3284
|
"get_file",
|
|
2972
3285
|
"get_file_history",
|
|
@@ -2975,6 +3288,8 @@ MCP_PROFILE_RECOMMENDATIONS: dict[str, dict[str, object]] = {
|
|
|
2975
3288
|
"get_git_state",
|
|
2976
3289
|
"get_graph",
|
|
2977
3290
|
"get_imports",
|
|
3291
|
+
"get_live_services",
|
|
3292
|
+
"get_monorepo_packages",
|
|
2978
3293
|
"get_project_structure",
|
|
2979
3294
|
"get_recent_changes",
|
|
2980
3295
|
"get_references",
|
|
@@ -2988,6 +3303,8 @@ MCP_PROFILE_RECOMMENDATIONS: dict[str, dict[str, object]] = {
|
|
|
2988
3303
|
"read_file",
|
|
2989
3304
|
"reconcile_static_runtime",
|
|
2990
3305
|
"resolve_symbol",
|
|
3306
|
+
"rollback_refactor",
|
|
3307
|
+
"safe_rename",
|
|
2991
3308
|
"search_code",
|
|
2992
3309
|
"search_memory",
|
|
2993
3310
|
"search_symbols",
|
codegraph/agent_rules.py
CHANGED
|
@@ -238,7 +238,7 @@ Select the smallest targeted tool that answers the question without over-fetchin
|
|
|
238
238
|
- **Symbol modification blast radius**: `analyze_impact(symbol=..., max_depth=3)`
|
|
239
239
|
- **Git commit diff impact**: `get_git_impact(base="HEAD~1", head="HEAD")`
|
|
240
240
|
- **Architecture & workspace packages**: `get_architecture()`
|
|
241
|
-
- **Multi-file debugging / DI / comprehensive task context**: `get_context(query=..., intent="DEBUG" | "TRACE" | "UNDERSTAND" | "IMPACT" | "ARCHITECTURE", max_tokens=4000, max_files=
|
|
241
|
+
- **Multi-file debugging / DI / comprehensive task context**: `get_context(query=..., intent="DEBUG" | "TRACE" | "UNDERSTAND" | "IMPACT" | "ARCHITECTURE", max_tokens=4000, max_files=25, max_lines=500)` (`task=...` is also supported as an alias)
|
|
242
242
|
|
|
243
243
|
---
|
|
244
244
|
|