return"Type of the development step that needs to be done to complete the entire task."
defstep_command_definition(extended=False):
# Base properties and required fields
properties={
"type":{
"const":"command",
"description":dev_step_type_description()
},
"command":command_definition(),
}
required=["type","command"]
# Extended properties
ifextended:
properties.update({
"need_to_see_output":{
"type":"boolean",
"description":"Set to `true` if the definition of subsequent steps may need to change after you see the output of a successful execution of this step. For example, if the purpose of a command is to check the status of a service or contents of a file before deciding how to proceed then this flag should be set to `true`. If subsequent steps can be executed as long as this step is successful, then this flag does not need to be set."
},
"check_if_fixed":{
"type":"boolean",
"description":"Flag that indicates if the original command that triggered the error that's being debugged should be tried after this step to check if the error is fixed. If you think that the original command `delete node_modules/ && delete package-lock.json` will pass after this step, then this flag should be set to TRUE and if you think that the original command will still fail after this step, then this flag should be set to `false`."
"description":"Description of a step in debugging this issue when there are code changes required. This should thoroughly describe what needs to be done to implement the code change for a single file - it cannot include changes for multiple files."
}
},
"required":["type","code_change_description"]
}
defcommand_definition(description_command='A single command that needs to be executed.',
description_timeout=
'Timeout in milliseconds that represent the approximate time this command takes to finish. '
@ -197,49 +332,6 @@ COMMAND_TO_RUN = {
},
}
DEV_TASKS_BREAKDOWN={
'definitions':[
{
'name':'break_down_development_task',
'description':'Breaks down the development task into smaller steps that need to be done to implement the entire task.',
'parameters':{
'type':'object',
"properties":{
"tasks":{
'type':'array',
'description':'List of smaller development steps that need to be done to complete the entire task.',
'items':{
'type':'object',
'description':'A smaller development step that needs to be done to complete the entire task. Remember, if you need to run a command that doesn\'t finish by itself (eg. a command to run an app), put the timeout to 3000 milliseconds. If you need to create a directory that doesn\'t exist and is not the root project directory, always create it by running a command `mkdir`',
'description':'Type of the development step that needs to be done to complete the entire task.',
},
'command':command_definition('A single command that needs to be executed.','Timeout in milliseconds that represent the approximate time the command takes to finish. This should be used only if the task is of a type "command". If you need to run a command that doesn\'t finish by itself (eg. a command to run an app), put the timeout to 3000 milliseconds. Remember, this is not in seconds but in milliseconds so likely it always needs to be greater than 1000.'),
'code_change_description':{
'type':'string',
'description':'Description of a the development step that needs to be done. This should be used only if the task is of a type "code_change" and it should thoroughly describe what needs to be done to implement the code change for a single file - it cannot include changes for multiple files.',
},
'human_intervention_description':{
'type':'string',
'description':'Description of a task that requires a human to do.',
},
},
'required':['type'],
}
}
},
"required":['tasks'],
},
},
],
'functions':{
'break_down_development_task':lambdatasks:tasks
},
}
IMPLEMENT_TASK={
'definitions':[
{
@ -250,61 +342,14 @@ IMPLEMENT_TASK = {
"properties":{
"tasks":{
'type':'array',
'description':'List of smaller development steps that need to be done to complete the entire task.',
'description':'List of smaller development steps.',
'items':{
'type':'object',
'description':'A smaller development step that needs to be done to complete the entire task. Remember, if you need to run a command that doesn\'t finish by itself (eg. a command to run an If you need to create a directory that doesn\'t exist and is not the root project directory, always create it by running a command `mkdir`',
'description':'Description of what a human needs to do to debug this issue. This should be used only if the task is of a type "human_intervention".',
},
},
'required':['type'],
"oneOf":[
step_command_definition(),
step_save_file_definition(),
step_modify_file_definition(),
step_human_intervention_definition(),
]
}
}
},
@ -573,35 +618,11 @@ DEBUG_STEPS_BREAKDOWN = {
'type':'array',
'description':'List of steps that need to be done to debug the problem.',
'items':{
'type':'object',
'description':'A single step that needs to be done to get closer to debugging this issue. Remember, if you need to run a command that doesn\'t finish by itself (eg. a command to run an app), put the timeout to 3000 milliseconds. If you need to create a directory that doesn\'t exist and is not the root project directory, always create it by running a command `mkdir`',
'description':'Type of the step that needs to be done to debug this issue.',
},
'command':command_definition('Command that needs to be run to debug this issue.','Timeout in milliseconds that represent the approximate time this command takes to finish. If you need to run a command that doesn\'t finish by itself (eg. a command to run an app), put the timeout to 3000 milliseconds.'),
'code_change_description':{
'type':'string',
'description':'Description of a step in debugging this issue when there are code changes required. This should be used only if the task is of a type "code_change" and it should thoroughly describe what needs to be done to implement the code change for a single file - it cannot include changes for multiple files.',
},
'human_intervention_description':{
'type':'string',
'description':'Description of a step in debugging this issue when there is a human intervention needed. This should be used only if the task is of a type "human_intervention".',
},
"need_to_see_output":{
'type':'boolean',
'description':'Set to `true` if the definition of subsequent steps may need to change after you see the output of a successful execution of this step. '
'For example, if the purpose of a command is to check the status of a service or contents of a file before deciding how to proceed then this flag should be set to `true`. '
'If subsequent steps can be executed as long as this step is successful, then this flag does not need to be set.',
},
"check_if_fixed":{
'type':'boolean',
'description':'Flag that indicates if the original command that triggered the error that\'s being debugged should be tried after this step to check if the error is fixed. If you think that the original command `delete node_modules/ && delete package-lock.json` will pass after this step, then this flag should be set to TRUE and if you think that the original command will still fail after this step, then this flag should be set to `false`.',