Skip to content

attempt_completion

The attempt_completion tool is used to inform the system and user that VJSP has determined the current task has been completed, and presents the task results to the user. This tool summarizes the completed work content, optionally includes command-line instructions for demonstrating results, and supports continuous optimization of results based on user feedback.

Parameter Description

This tool accepts the following parameters:

  • result (required): Task result description, used to summarize the completed work content
  • command (optional): Command Line Interface (CLI) instruction used to execute and demonstrate the task results

Core Functions

By presenting the final summary information of task completion, this tool marks the end of the task flow and bidirectionally transmits a signal to both the user and the system that "the current task has been completed". If a demonstration instruction is configured, the task results can be intuitively displayed through real-time execution of the instruction.

Applicable Scenarios

  • When VJSP determines that the user's target task has been fully completed
  • When there is a need to summarize changes and optimization points generated during task execution
  • When there is a need to intuitively demonstrate task results through command-line instruction execution
  • When there is a need to provide a result feedback node for users to provide opinions on the solution
  • When transitioning from the current execution phase to a potential result optimization phase

Key Features

  • Clearly transmits the signal that "VJSP has determined the task is complete" to the system and user
  • Summarizes all completed work content in concise text
  • Supports visual demonstration of task results through command-line instruction execution
  • Supports receiving user feedback and subsequent optimization of results based on feedback
  • Displays task results in a dedicated UI format distinct from regular messages
  • Collects telemetry data on task completion to provide data support for system analysis
  • Maintains structured advancement of the conversation flow by setting feedback nodes
  • Supports reporting and identification of "subtask completion" in complex workflows
  • Ensures users clearly receive a complete summary of task execution results
  • Belongs to the "globally available toolset" and can be called in all VJSP operation modes

Limitations

  • Should be used after confirming that all previously called tools have executed successfully (this requirement is a standard guideline, not a programmatic constraint)
  • Result demonstration only supports configuration of a single command-line instruction, does not support multi-instruction configuration
  • Cannot provide multiple instruction options for users to choose from for result demonstration
  • Configured demonstration instructions require user confirmation and authorization before execution
  • Only supports demonstration of task results that can be presented through command-line instruction execution
  • Cannot be used for progress reporting or phased updates of "partially completed" tasks
  • XML closing tags are automatically filtered from the result text during internal processing

Execution Flow

After calling the attempt_completion tool, the system will execute according to the following flow:

  1. Security Verification (standard guideline, not a programmatic constraint)

    • The AI verifies the execution results of previously called tools to confirm all prerequisite tools have executed successfully
    • This step is a best practice guideline and does not have a programmatic mandatory verification mechanism
  2. Result Information Presentation

    • Displays the summary information of task completion to the user in the dedicated completion_result UI format
    • Calls the removeClosingTag function to automatically filter XML closing tags from the result text
    • Adopts a display format different from regular messages to achieve visual distinction of result identification
  3. Demonstration Instruction Execution (triggered when command parameter is configured)

    • First initiates an authorization request to the user for instruction execution, obtaining user confirmation
    • Only executes the configured command-line demonstration instruction after user authorization
    • Calls the system's command execution capability to run the demonstration instruction
    • Displays the complete execution results of the instruction to the user
  4. Feedback Information Collection

    • Enters a feedback waiting state to receive user evaluations and optimization suggestions for task results
    • Structurally processes user feedback and transmits it back to VJSP's core reasoning module
    • Initiates the subsequent optimization process for results based on user feedback
  5. Task Conclusion and Process Continuation

    • Marks the status of "current task completed" in the system
    • Collects and stores completion telemetry data for this task
    • If reporting a subtask, provides the user with the option to "complete the current subtask and resume parent task execution"
    • Supports continuous advancement of the conversation flow and iterative optimization of results through the feedback mechanism
  6. Engineering Implementation Integration

    • The execution results of the tool are parsed through the system parsing mechanism (parse-assistant-message.ts script)
    • The tool belongs to the toolset defined by the ALWAYS_AVAILABLE_TOOLS constant, achieving global availability across all modes

Result Text Writing Guidelines

The text for result description (result) must follow these guidelines:

  • Clearly and accurately convey the completed work content without ambiguity or omissions
  • Ensure the completeness of result information while maintaining text conciseness
  • Focus on the value delivered to the user, highlighting how the task results meet user needs
  • Avoid meaningless polite phrases and redundant filler text
  • Maintain a professional and direct technical communication tone
  • Adopt an easily scannable and understandable expression format (such as bullet points)
  • Clearly remind users: feedback can be provided on the results to facilitate subsequent optimization

Note: The system will automatically filter all XML closing tags from the result text through the removeClosingTag function, so no additional processing is required during writing.

Demonstration Instruction Selection Guidelines

When configuring demonstration instructions (command), the following guidelines must be followed:

  • Prioritize selecting instructions that can visually demonstrate task results to intuitively present execution effects
  • Prioritize selecting instructions that can display result creation/modification results to align with user perception
  • Recommended instruction examples:
    • open index.html: Open the created web成果
    • npm start: Start the development server and run the front-end application results
    • python app.py: Execute the written Python application script
  • Avoid using instructions only for text printing (such as echo, cat)
  • Clearly note: All configured demonstration instructions require user authorization before execution
  • Ensure cross-system compatibility of instructions, adapting to the user's operating system environment

Feedback Mechanism and UI Display

The attempt_completion tool has a dedicated result feedback mechanism with the following core features:

  • Task results are displayed in a dedicated completion_result UI format, forming a visual distinction from regular messages
  • After tool execution, the system enters a feedback waiting state until receiving the user's evaluation of the results
  • User feedback is structurally processed and transmitted back to the VJSP core module to support subsequent optimization of results
  • Forms an iterative cycle of "result reporting → user feedback → result optimization" instead of directly terminating the conversation
  • The front-end UI provides dedicated interactive components to facilitate users in submitting result feedback
  • The result reporting node serves as a clear milestone in the conversation flow, supporting structured advancement of the dialogue

Special Handling for Subtask Reporting

When the tool is used for subtask completion reporting, the system will provide dedicated capabilities:

  • Present the user with the option to "complete the current subtask and resume parent task execution"
  • If the user confirms, summarize the results of the current subtask and mark it as "completed"
  • The parent task will resume the execution flow and inherit context information based on the completion results of the subtask
  • Achieve context preservation and coherent advancement of processes in complex nested workflows

Application Examples

Reporting only result summary (without demonstration instruction)

<attempt_completion>
<result>
Completed CSS style updates for the navigation bar, fully matching the design requirements. Specific changes are as follows:
1. Upgraded color scheme to match the new brand color specifications
2. Added mobile responsive adaptation logic to support multi-terminal display
3. Fixed element alignment issues in the dropdown menu
</result>
</attempt_completion>

Reporting result summary + configuring demonstration instruction

<attempt_completion>
<result>
Completed the development of a simple React application with the following functional features:
1. Developed a responsive landing page that meets requirements, including the specified hero section
2. Implemented an interactive contact form with form validation
3. Completed routing navigation functionality for three specified pages
4. Style development fully matches the provided design specifications
</result>
<command>npm start</command>
</attempt_completion>

Python script development task (result reporting + execution demonstration)

<attempt_completion>
<result>
Completed the development of a data processing script with the following core capabilities:
1. Supports reading all CSV format data files in the data directory
2. Completes data cleaning and standardization processing according to requirements
3. Generates JSON format data analysis summary statistics results
4. Outputs processed structured data to the output directory
</result>
<command>python process_data.py</command>
</attempt_completion>