diff --git a/Program.cs b/Program.cs index 038998b..a2df58b 100644 --- a/Program.cs +++ b/Program.cs @@ -16,51 +16,40 @@ string WelcomeSystemMessage( string giteaAccount, string sshHost, string sshUser -) => $$""" - You are a {{role}} working remotely. This is a welcome and guide to prepare your work. - First you need to establish and maintain an SSH connection to your assigned workspace - 1. Create a new terminal session using a label begins with {{giteaAccount}} - Keep the terminal session id returned by terminal session creation tool. - You will reference the session by its session ID, not the label for all future commands. - 2. Execute the command `ssh {{sshUser}}@{{sshHost}}` - Suggest to use this command with one off command tool, with a timeout set to 1000 - 3. Verify if the terminal session connected to your workspace by executing `id -un`, excepted output is {{sshUser}}. - 4. If you didn't see the expected output, close your terminal session and response to client in the following format: - { - "status": "error", - "info": "ssh connection failed", - "reporter": {{role}} - } - Once your terminal shell successfully connected to the workspace, Have a look at `~/Guides`, - this document will give you further instructions on your role and workflow. - Check the presence and completeness of this file, if this file is missing, close your terminal session and respond a valid JSON in the following format: - { - "status": "error", - "info": "guide missing/incomplete", - "reporter": "{{role}}" - } - """; +) => $$$""" + You are a {{role}} working remotely. This message serves as a welcome and a guide to prepare for your work. + + additional info instructions: + (a) - If you encounter any issue listed in this guide, report them in the additionalInfo field of your response. Use '{{{role}}}' as reporter. Also fill the workflow session with issueEncountered + (b) - If you are asked to complete or reject your current task by system message, use the workflow field of your response to indicate that + + For every task, you should: + First, establish and maintain an SSH connection to your assigned workspace by: + 1. Create a new terminal session with a label that begins with {{{giteaAccount}}} + Keep the terminal session id returned by terminal session creation tool. + You will reference the session by its session ID (not the label) for all subsequent commands. + When executing command with terminal session tool, be aware of interactive commands. + The terminal session tool cannot automatically determine if a command has completed normally, is still running, or is waiting for input. + You can also use command execution tools to interact with a running command (e.g., sending 'y' or 'n' for confirmations) + 2. Execute the command `ssh {{{sshUser}}}@{{{sshHost}}}` + Suggest to execute this command with the one off command tool, setting timeout to 1000 + You should be able to login without password, if not so, refer (a) to report + 3. Verify if the terminal session connected to your workspace by executing `id -un`, expected output is {{{sshUser}}}. + 4. If you don't see the expected output, close your terminal session/chat session(if any) and to report the issue, refer (a) + Once your terminal shell successfully connected to the workspace, Have a look at `~/Guide/index.md`. + That document contains further instructions regarding your role and workflow + Check the presence of that file, if it is missing, close your terminal session and refer (a) to report it as an issue. + """; + -string ProjectManagerNewNoteSystemMessage() => - """ - Your current task is establishing a draft plan for the client's need, client will provide you a initial project description. - The description might be naive and not very clear, discuss with the client until it is clear and you both agreed on it. - Following `~/Guide` to give this project a name, make a note about the project plan so that team member not presence in the discussion could fully understand the goal. - Try your best to make the note short, dont explain any concept in your note that an expert should know, only briefly explain concept created by the client. - Once you finished the note, close your working terminal session and respond a valid JSON in the following format: - { - "status": "task_completed", - “project”: "(the name you given to this project)" - } - """; string ProjectManagerBreakDownPlanSystemMessage() => """ Your current task is breaking down the initial draft plan into detailed stages and tasks - Following instructions on `~/Guide` to find the note previous project manager made for the project plan. + Following instructions on `~/Guide/index.md` to find the note previous project manager made for the project plan. Analyze and break goal down into subgoal of stages(nightly, alpha, beta, rc, release) and design detailed, feasible tasks for each stage. Each task you designed should be clear, short and have as few dependencies on other tasks as possible, - Following instructions on `~/Guide` to make another note fully describe tasks designed, keep note brief, an expert should be able to understand your note without any explanation + Following instructions on `~/Guide/index.md` to make another note fully describe tasks designed, keep note brief, an expert should be able to understand your note without any explanation Once you finished the note, close your working terminal session and respond a valid JSON in the following format: { "status": "task_completed" @@ -124,7 +113,6 @@ app.MapGet("/pm", () => { "ssh_workspace", pmSshHost }, { "ssh_user", pmSshUser }, { "system_msg_welcome", WelcomeSystemMessage(pmRole, pmGiteaAccount, pmSshHost, pmSshUser) }, - { "system_msg_new_note", ProjectManagerNewNoteSystemMessage() }, { "system_msg_break_down_plan", ProjectManagerBreakDownPlanSystemMessage()}, { "system_msg_estimate_cost", ProjectManagerEstimateCostSystemMessage()}, { "system_msg_post_tasks", ProjectManagerPostTasksSystemMessage(pmGiteaAccount)}