new csharp support track
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# Track csharp_language_support_tools_20260310 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"track_id": "csharp_language_support_tools_20260310",
|
||||
"type": "feature",
|
||||
"status": "new",
|
||||
"created_at": "2026-03-10T01:15:00Z",
|
||||
"updated_at": "2026-03-10T01:15:00Z",
|
||||
"description": "C# language support tools (Unreal build script, Unity and Godot scripting usage)."
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
# Implementation Plan: C# MCP Tools
|
||||
|
||||
## Phase 1: Grammar Integration & Base Parser
|
||||
- [ ] Task: Update project dependencies (e.g., `requirements.txt` or `pyproject.toml`) to include the native `tree-sitter-c-sharp` dependency.
|
||||
- [ ] Task: Write Tests: Verify the tree-sitter parser can successfully initialize the C# language and parse a simple `namespace { class A { void M() {} } }` string.
|
||||
- [ ] Task: Implement: Create `src/csharp_parser.py` (or extend existing AST parsers) to handle the base C# tree-sitter initialization and generic node walking.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 1: Grammar Integration & Base Parser' (Protocol in workflow.md)
|
||||
|
||||
## Phase 2: Structural & Context Tools
|
||||
- [ ] Task: Write Tests: Verify `cs_get_skeleton` and `cs_get_code_outline` against a complex C# file containing namespaces, classes, properties, attributes, and XML docstrings.
|
||||
- [ ] Task: Implement: Add `cs_get_skeleton` logic to extract namespaces, classes, method signatures, attributes, and replace bodies with `...`.
|
||||
- [ ] Task: Implement: Add `cs_get_code_outline` and `cs_get_docstring` logic to traverse the AST and map line numbers and comments.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 2: Structural & Context Tools' (Protocol in workflow.md)
|
||||
|
||||
## Phase 3: Surgical Editing Tools
|
||||
- [ ] Task: Write Tests: Verify `cs_get_definition` returns the exact source text of a targeted method or class, and `cs_update_definition` replaces it accurately within a larger file.
|
||||
- [ ] Task: Implement: Add `cs_get_definition` logic using AST line/byte ranges.
|
||||
- [ ] Task: Implement: Add `cs_update_definition` and `cs_set_signature` logic to perform string replacement based on strict AST node boundaries.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 3: Surgical Editing Tools' (Protocol in workflow.md)
|
||||
|
||||
## Phase 4: MCP Client Integration & Polish
|
||||
- [ ] Task: Write Tests: Verify the new tools are successfully registered and invokable via the `mcp_client.py` unified interface.
|
||||
- [ ] Task: Implement: Register the new `cs_*` functions as official tools in `src/mcp_client.py`.
|
||||
- [ ] Task: Implement: Ensure the caching layer (mtime invalidation) is correctly applied to the new C# parsing operations.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 4: MCP Client Integration & Polish' (Protocol in workflow.md)
|
||||
@@ -0,0 +1,32 @@
|
||||
# Specification: C# MCP Tools
|
||||
|
||||
## Overview
|
||||
Expand the Conductor's AI context-gathering and surgical editing capabilities by introducing full Tree-Sitter parsing support for C#. This brings C# to feature-parity with existing Python MCP tools, enabling deep AST-driven structural mapping, documentation extraction, and precise code modification, specifically targeting Unreal Engine build scripts, and Unity/Godot scripting.
|
||||
|
||||
## Functional Requirements
|
||||
- **Grammar Integration:**
|
||||
- Introduce the stable `tree-sitter-c-sharp` grammar to the project's parsing environment as a native dependency to generate deterministic Abstract Syntax Trees for `.cs` files.
|
||||
- **Structural Parsing Tools:**
|
||||
- **`cs_get_skeleton`:** Extract a high-level view of a C# file, containing all namespaces, class/struct/interface declarations, fields, properties, and method signatures with their associated XML docstrings. Method bodies will be replaced with `...`.
|
||||
- **`cs_get_code_outline`:** Generate a hierarchical text outline showing line ranges for major structural elements (namespaces, classes, methods).
|
||||
- **Documentation & Context Tools:**
|
||||
- **`cs_get_docstring`:** Extract the XML docstring (`///`) immediately preceding a class, field, property, or method definition.
|
||||
- **`cs_find_usages`:** Locate usages of specific C# symbols across a file or directory using strict regex or AST node analysis.
|
||||
- **Surgical Editing Tools:**
|
||||
- **`cs_get_definition`:** Extract the full source code of a specific C# method, class, or property.
|
||||
- **`cs_update_definition`:** Surgically replace the implementation of a specific C# method or class without relying on generic search-and-replace strings.
|
||||
- **`cs_set_signature`:** Update only the signature (modifiers, return type, parameters) of a C# method.
|
||||
|
||||
## Non-Functional Requirements
|
||||
- **Performance:** Parsing and skeleton generation should utilize the existing `mtime` invalidation cache to ensure near-instantaneous responses.
|
||||
- **Robustness:** The parser must gracefully handle malformed or incomplete C# code (e.g., during active development), returning as much structural information as possible rather than failing entirely.
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] A new suite of C#-specific tools (`cs_get_skeleton`, `cs_get_code_outline`, `cs_get_definition`, `cs_update_definition`) is registered and available via the MCP Client.
|
||||
- [ ] Automated tests verify that `cs_get_skeleton` correctly identifies namespaces, classes, methods, and C#-specific constructs (like attributes `[Serializable]` and properties `{ get; set; }`).
|
||||
- [ ] `cs_update_definition` successfully replaces a multi-line method body while maintaining the surrounding file structure and indentation.
|
||||
- [ ] The `tree-sitter-c-sharp` native dependency is successfully integrated into the python environment setup (`uv` / `requirements.txt`).
|
||||
|
||||
## Out of Scope
|
||||
- Full language server protocol (LSP) features like deep cross-file type inference, semantic variable renaming, or Roslyn integration.
|
||||
- Automated code formatting or linting for C# (this relies on external ecosystem tools like `dotnet format`).
|
||||
28
config.toml
28
config.toml
@@ -24,28 +24,36 @@ separate_response_panel = false
|
||||
separate_tool_calls_panel = false
|
||||
bg_shader_enabled = true
|
||||
crt_filter_enabled = false
|
||||
separate_task_dag = true
|
||||
separate_usage_analytics = true
|
||||
separate_task_dag = false
|
||||
separate_usage_analytics = false
|
||||
separate_tier1 = false
|
||||
separate_tier2 = false
|
||||
separate_tier3 = false
|
||||
separate_tier4 = false
|
||||
|
||||
[gui.show_windows]
|
||||
"Context Hub" = true
|
||||
"Files & Media" = true
|
||||
"AI Settings" = true
|
||||
"MMA Dashboard" = true
|
||||
"Task DAG" = true
|
||||
"Usage Analytics" = true
|
||||
"Tier 1: Strategy" = true
|
||||
"Tier 2: Tech Lead" = true
|
||||
"Tier 3: Workers" = true
|
||||
"Tier 4: QA" = true
|
||||
"Task DAG" = false
|
||||
"Usage Analytics" = false
|
||||
"Tier 1" = false
|
||||
"Tier 2" = false
|
||||
"Tier 3" = false
|
||||
"Tier 4" = false
|
||||
"Tier 1: Strategy" = false
|
||||
"Tier 2: Tech Lead" = false
|
||||
"Tier 3: Workers" = false
|
||||
"Tier 4: QA" = false
|
||||
"Discussion Hub" = true
|
||||
"Operations Hub" = true
|
||||
Message = true
|
||||
Response = true
|
||||
"Tool Calls" = true
|
||||
"Tool Calls" = false
|
||||
Theme = true
|
||||
"Log Management" = true
|
||||
Diagnostics = false
|
||||
Diagnostics = true
|
||||
|
||||
[theme]
|
||||
palette = "Nord Dark"
|
||||
|
||||
@@ -44,18 +44,18 @@ Collapsed=0
|
||||
DockId=0x00000001,0
|
||||
|
||||
[Window][Message]
|
||||
Pos=1890,1100
|
||||
Size=1065,548
|
||||
Pos=642,1879
|
||||
Size=1002,242
|
||||
Collapsed=0
|
||||
|
||||
[Window][Response]
|
||||
Pos=2086,1780
|
||||
Size=1036,351
|
||||
Pos=1700,1898
|
||||
Size=1111,224
|
||||
Collapsed=0
|
||||
|
||||
[Window][Tool Calls]
|
||||
Pos=99,730
|
||||
Size=762,628
|
||||
Pos=1461,1220
|
||||
Size=913,631
|
||||
Collapsed=0
|
||||
|
||||
[Window][Comms History]
|
||||
@@ -73,8 +73,8 @@ Collapsed=0
|
||||
DockId=0xAFC85805,2
|
||||
|
||||
[Window][Theme]
|
||||
Pos=0,1079
|
||||
Size=629,1058
|
||||
Pos=0,850
|
||||
Size=629,1287
|
||||
Collapsed=0
|
||||
DockId=0x00000002,2
|
||||
|
||||
@@ -90,8 +90,8 @@ Collapsed=0
|
||||
DockId=0x0000000C,2
|
||||
|
||||
[Window][Context Hub]
|
||||
Pos=0,1079
|
||||
Size=629,1058
|
||||
Pos=0,850
|
||||
Size=629,1287
|
||||
Collapsed=0
|
||||
DockId=0x00000002,1
|
||||
|
||||
@@ -114,14 +114,14 @@ Collapsed=0
|
||||
DockId=0x00000012,0
|
||||
|
||||
[Window][Files & Media]
|
||||
Pos=0,1079
|
||||
Size=629,1058
|
||||
Pos=0,850
|
||||
Size=629,1287
|
||||
Collapsed=0
|
||||
DockId=0x00000002,0
|
||||
|
||||
[Window][AI Settings]
|
||||
Pos=0,28
|
||||
Size=629,1049
|
||||
Size=629,820
|
||||
Collapsed=0
|
||||
DockId=0x00000001,0
|
||||
|
||||
@@ -132,13 +132,13 @@ Collapsed=0
|
||||
|
||||
[Window][MMA Dashboard]
|
||||
Pos=2833,28
|
||||
Size=1007,1695
|
||||
Size=1007,1872
|
||||
Collapsed=0
|
||||
DockId=0x0000000C,0
|
||||
|
||||
[Window][Log Management]
|
||||
Pos=2833,28
|
||||
Size=1007,1695
|
||||
Size=1007,1872
|
||||
Collapsed=0
|
||||
DockId=0x0000000C,1
|
||||
|
||||
@@ -148,20 +148,20 @@ Size=262,209
|
||||
Collapsed=0
|
||||
|
||||
[Window][Tier 1: Strategy]
|
||||
Pos=2833,1725
|
||||
Size=1007,412
|
||||
Pos=2833,1902
|
||||
Size=1007,235
|
||||
Collapsed=0
|
||||
DockId=0x0000000F,0
|
||||
|
||||
[Window][Tier 2: Tech Lead]
|
||||
Pos=2833,1725
|
||||
Size=1007,412
|
||||
Pos=2833,1902
|
||||
Size=1007,235
|
||||
Collapsed=0
|
||||
DockId=0x0000000F,1
|
||||
|
||||
[Window][Tier 4: QA]
|
||||
Pos=2833,1725
|
||||
Size=1007,412
|
||||
Pos=2833,1902
|
||||
Size=1007,235
|
||||
Collapsed=0
|
||||
DockId=0x0000000F,2
|
||||
|
||||
@@ -327,13 +327,13 @@ Size=956,942
|
||||
Collapsed=0
|
||||
|
||||
[Window][Task DAG]
|
||||
Pos=1461,823
|
||||
Size=1190,872
|
||||
Pos=2397,1224
|
||||
Size=1340,621
|
||||
Collapsed=0
|
||||
|
||||
[Window][Usage Analytics]
|
||||
Pos=1636,680
|
||||
Size=644,666
|
||||
Pos=2530,426
|
||||
Size=275,375
|
||||
Collapsed=0
|
||||
|
||||
[Table][0xFB6E3870,4]
|
||||
@@ -428,15 +428,15 @@ DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,28 Size=3840,2109 Split=
|
||||
DockNode ID=0x00000003 Parent=0xAFC85805 SizeRef=2831,1183 Split=X
|
||||
DockNode ID=0x0000000B Parent=0x00000003 SizeRef=404,1186 Split=X Selected=0xF4139CA2
|
||||
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=629,858 Split=Y Selected=0x8CA2375C
|
||||
DockNode ID=0x00000001 Parent=0x00000007 SizeRef=824,1049 CentralNode=1 Selected=0x7BD57D6A
|
||||
DockNode ID=0x00000002 Parent=0x00000007 SizeRef=824,1058 Selected=0x1DCB2623
|
||||
DockNode ID=0x00000001 Parent=0x00000007 SizeRef=824,820 CentralNode=1 Selected=0x7BD57D6A
|
||||
DockNode ID=0x00000002 Parent=0x00000007 SizeRef=824,1287 Selected=0x1DCB2623
|
||||
DockNode ID=0x0000000E Parent=0x0000000B SizeRef=2200,858 Split=X Selected=0x418C7449
|
||||
DockNode ID=0x00000012 Parent=0x0000000E SizeRef=1068,402 Selected=0x418C7449
|
||||
DockNode ID=0x00000013 Parent=0x0000000E SizeRef=1130,402 Selected=0x6F2B5B04
|
||||
DockNode ID=0x0000000D Parent=0x00000003 SizeRef=435,1186 Selected=0x363E93D6
|
||||
DockNode ID=0x00000004 Parent=0xAFC85805 SizeRef=1007,1183 Split=Y Selected=0x3AEC3498
|
||||
DockNode ID=0x0000000C Parent=0x00000004 SizeRef=1074,1695 Selected=0x3AEC3498
|
||||
DockNode ID=0x0000000F Parent=0x00000004 SizeRef=1074,412 Selected=0xBB346584
|
||||
DockNode ID=0x0000000C Parent=0x00000004 SizeRef=1074,1872 Selected=0x3AEC3498
|
||||
DockNode ID=0x0000000F Parent=0x00000004 SizeRef=1074,235 Selected=0xBB346584
|
||||
|
||||
;;;<<<Layout_655921752_Default>>>;;;
|
||||
;;;<<<HelloImGui_Misc>>>;;;
|
||||
|
||||
Reference in New Issue
Block a user