Class CodingPartnerService
java.lang.Object
com.shaft.mcp.CodingPartnerService
MCP planning tools for a repository-aware SHAFT IntelliJ coding partner.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondiff(String repositoryPath, String targetSourcePath, List<String> codeBlocks, String insertionAnchor) Builds a preview-only unified diff that inserts reviewed SHAFT code blocks into an existing Java target.plan(String repositoryPath, String intent, String backend, String currentSourcePath, String selectedText, List<String> artifactPaths, int maxResults) Builds a preview-only plan for turning user intent, existing Java code, and evidence into SHAFT changes.
-
Constructor Details
-
CodingPartnerService
public CodingPartnerService()Creates the default coding partner service.Resolution of the effective MCP workspace root (which may probe or create local directories) is deferred until a tool method actually runs, so bean construction never performs filesystem access.
-
-
Method Details
-
plan
@Tool(name="shaft_coding_partner_plan", description="plans a repository-aware SHAFT IntelliJ coding-partner workflow using current source, selected text, existing page objects/tests, capture evidence, and verification guidance") public McpCodingPartnerPlan plan(String repositoryPath, String intent, String backend, String currentSourcePath, String selectedText, List<String> artifactPaths, int maxResults) Builds a preview-only plan for turning user intent, existing Java code, and evidence into SHAFT changes.- Parameters:
repositoryPath- workspace-contained repository rootintent- user scenario or coding intentbackend- requested backend, usually webdriver or playwrightcurrentSourcePath- current IntelliJ Java file path, absolute or repository-relativeselectedText- selected source snippet or pasted manual contextartifactPaths- optional evidence paths such as traces, Allure results, or screenshotsmaxResults- maximum reuse candidates to return- Returns:
- preview-only coding partner plan
-
diff
@Tool(name="shaft_coding_partner_diff", description="produces a preview-only unified diff that inserts reviewed SHAFT code blocks into an existing Java target at a chosen method or textual anchor; never writes files") public McpCodingPartnerDiff diff(String repositoryPath, String targetSourcePath, List<String> codeBlocks, String insertionAnchor) Builds a preview-only unified diff that inserts reviewed SHAFT code blocks into an existing Java target.The MCP server never writes files; the returned diff is for IntelliJ to preview and apply under explicit user approval.
- Parameters:
repositoryPath- workspace-contained repository roottargetSourcePath- Java target file, absolute or repository-relativecodeBlocks- reviewed SHAFT code blocks to insert (Markdown fences are stripped)insertionAnchor- optional existing method or textual anchor to insert after- Returns:
- preview-only unified diff
-