diff --git a/app/Mcp/Prompts/EvolveClientSetup.php b/app/Mcp/Prompts/EvolveClientSetup.php new file mode 100644 index 0000000..8057638 --- /dev/null +++ b/app/Mcp/Prompts/EvolveClientSetup.php @@ -0,0 +1,39 @@ +createContext(); + + $this->assertSame('evolve-client-setup', $context->prompts()->first()?->name()); + $this->assertSame('Evolve Client Setup', $context->prompts()->first()?->title()); + $this->assertSame('evolve://guides/workflow', $context->resources()->first()?->uri()); + $this->assertStringContainsString('evolve-client-setup', $context->instructions); + } + + public function test_guidance_prompt_and_resource_explain_safe_tool_use(): void + { + EvolveServer::prompt(EvolveClientSetup::class) + ->assertOk() + ->assertSee([ + 'Use `list-artifacts` and `read-artifact` before changing workbench files.', + 'Mutating tools default to `dry_run: true`', + 'Use `send-feedback` and `triage-feedback` only for developer/agent process feedback', + 'evolve://guides/workflow', + ]); + + EvolveServer::resource(EvolveWorkflowGuide::class) + ->assertOk() + ->assertSee([ + '# Evolve MCP Workflow Guide', + 'Run mutating tools in dry-run mode first.', + 'Destructive and restorative operations require `confirm_id`', + 'Direct artifact file edits should be a last resort', + ]); + } + public function test_artifact_tools_list_read_and_dry_run_without_writing(): void { File::ensureDirectoryExists(resource_path('evolve'));