deploy draft

Change-Id: Ied7209985584e121e8874c1562344d6cdd14ab49
diff --git a/dodo_tools/dodo.go b/dodo_tools/dodo.go
index fdb7c8f..2eccd45 100644
--- a/dodo_tools/dodo.go
+++ b/dodo_tools/dodo.go
@@ -134,20 +134,6 @@
 	projectId      string
 }
 
-const (
-	deployProjectSchemaInputSchema = `
-{
-	"type": "object",
-	"properties": {
-		"config": {
-			"type": "string",
-			"description": "Serialized dodo-app configuration to deploy"
-		}
-	}
-}
-`
-)
-
 func NewDeployProjectTool(apiBaseAddress string, projectId string) *llm.Tool {
 	tool := &DeployProjectTool{
 		apiBaseAddress: apiBaseAddress,
@@ -157,33 +143,19 @@
 	return &llm.Tool{
 		Name:        "dodo_deploy_project",
 		Description: "A tool for deploying the dodo-app configuration",
-		InputSchema: llm.MustSchema(deployProjectSchemaInputSchema),
+		InputSchema: llm.EmptySchema(),
 		Run:         tool.Run,
 		EndsTurn:    true,
 	}
 }
 
-type DeployProjectInput struct {
-	Config string `json:"config"`
-}
-
-type DeployProjectOutput struct {
-	Success bool `json:"success"`
-	Errors  any  `json:"errors,omitempty"`
-}
-
 type deployProjectReq struct {
-	Config map[string]any `json:"config"`
+	Type string `json:"type"`
 }
 
 func (d *DeployProjectTool) Run(ctx context.Context, m json.RawMessage) ([]llm.Content, error) {
-	var input DeployProjectInput
-	if err := json.Unmarshal(m, &input); err != nil {
-		return nil, err
-	}
-	req := deployProjectReq{}
-	if err := json.Unmarshal([]byte(input.Config), &req.Config); err != nil {
-		return nil, err
+	req := deployProjectReq{
+		Type: "draft",
 	}
 	jsonReq, err := json.Marshal(req)
 	if err != nil {
@@ -216,10 +188,6 @@
 {
 	"type": "object",
 	"properties": {
-		"config": {
-			"type": "string",
-			"description": "Serialized dodo-app configuration to save"
-		}
 	}
 }
 `
@@ -244,11 +212,6 @@
 	Config string `json:"config"`
 }
 
-type SaveProjectOutput struct {
-	Success bool `json:"success"`
-	Errors  any  `json:"errors,omitempty"`
-}
-
 type saveProjectReq struct {
 	Type   string         `json:"type"`
 	Config map[string]any `json:"config"`
@@ -288,7 +251,7 @@
 	return []*llm.Tool{
 		NewGetProjectConfigTool(apiBaseAddress, projectId),
 		NewValidateConfigTool(apiBaseAddress),
-		NewDeployProjectTool(apiBaseAddress, projectId),
 		NewSaveProjectTool(apiBaseAddress, projectId),
+		NewDeployProjectTool(apiBaseAddress, projectId),
 	}
 }
diff --git a/loop/agent_system_prompt.txt b/loop/agent_system_prompt.txt
index 473431d..6eb46f1 100644
--- a/loop/agent_system_prompt.txt
+++ b/loop/agent_system_prompt.txt
@@ -80,27 +80,27 @@
 <dodo>
 You are developing application on top of the dodo. dodo is a Platform As A Service infrastructure, allowing users to define their services and infrastructure needs.
 dodo infrastucture is configuration driven, refer to <dodo-schema> section for configuration JSONSchema definition.
+
 Use following tools to interact with dodo:
 1. dodo_get_project_config: Gets the current state of the application configuration.
 2. dodo_validate_config: Takes dodo-app configuration and validates it. Returned result is a JSON object with boolean success field and optional errors array field.
 3. dodo_save_config: Takes dodo-app configuration and saves it as a current working draft. Always use this tool before actually deploying the new configuration, so that user can verify the changes first.
-3. dodo_deploy_project: Takes new configuration and deployes it.
+3. dodo_deploy_project: Deploys latest saved draft configuration.
 
 You might want to use dodo tools in following scenarios:
 1. User explicitely asks to get the current configuration.
 2. User explicitely asks to add new infrastructure pieces or modify existing ones.
-3. User asks you to implement new feature which requires new infrastucture piece.
+3. User asks you to implement new feature which requires new infrastucture piece. In this case always present the user with the changes you plan to make in the dodo configuration.
 
 When making changes in the dodo-app configuration, make sure that:
-1. It is valid before presenting your changes to user or sending it to dodo API for deployment.
+1. It is valid before presenting your changes to the user.
 2. Carefully inspect validation result and fix all the errors.
 3. Make sure to save the new configuration before deploying it.
-4. Use the todo_read and todo_write tools to organize and track your dodo-app configuration changes.
+4. You do not need user consent to validate or save new draft configuration.
+5. Deploy project only when user explicitly asks for it.
+6. Use the todo_read and todo_write tools to organize and track your dodo-app configuration changes.
 
 Always pretty print dodo-app config before presenting it to the user.
-
-When you are not sure about the modification you've made in the dodo-app configuration, ask user for confirmation. When requesting confirmation, be very clear about it and formulate request as a question. Again, be very clear and terse when asking questions to the user.
-Use multiplechoice tool with Yes/No options when asking user confirmation.
 </dodo>
 
 <dodo-schema>