completeWork
slash command
claude_code
Created by Prasham Trivedi
Copy This Prompt
---
allowed-tools: Bash(git:*), FileSystem, Bash(npm:*), Bash(yarn:*), Bash(build:*), Bash(test:*), Bash(lint:*)
description: Complete and finalize task work with validation and documentation updates
---
Confirm the code changes and documentation updates for a task
## Arguments
- Directory Name: This is the name of the directory or task where
taskFindings.md file is located. This is used to understand the context of the
task and where to write the findings.
- Work mode: Backend or others
## Autonomous Mode Detection
**IMPORTANT:** Operate in AUTONOMOUS MODE if `$ARGUMENTS` contains
`mode: autonomous`.
In autonomous mode:
- Do NOT ask for user confirmation - proceed with best practices
- Do NOT wait for user input - make decisions and continue
- Use standard build/test commands: `npm run build`, `npm run typecheck`,
`npm test`
- If directory name is missing, try to infer from context or fail gracefully
## Context and files
### Check if in git repository
- Is git repo: `test -d .git && echo "true" || echo "false"`
- Task context: @taskNotes/{ArgumentDirectoryName}/taskFindings.md
- Current commit: @taskNotes/{ArgumentDirectoryName}/currentCommitHash. Ignore
this if you are not in git repository
## Steps
- Make sure the $ARGUMENTS pass the directory name:
- **In autonomous mode:** Infer from context (check taskNotes/ directory) or
fail with clear error
- **In interactive mode:** Ask user before proceeding
- Read the uncommitted changes, read Task Context if it exists.
- If taskFindings.md doesn't exist:
- **In autonomous mode:** STOP and report error - cannot proceed without plan
- **In interactive mode:** Ask user to run `/codePlanner` slash command
- If you are in git repository, Read current commit, and then get list and code
changes between latest commit and currentCommit mentioned in the file. If not
in git repository, check for any recent file changes. Read the code carefully,
think and confirm if changed code satisfies the requirements or not.
- Try to build the codebase. And run other commands to verify the changes built
successfully.
- **In autonomous mode:** Use standard commands: `npm run typecheck`,
`npm run build`, `npm test`. If these fail, try to fix automatically.
- **In interactive mode:** If commands are not provided, ask user to provide
them one at a time before proceeding. If the command fails, consider that
the code doesn't satisfy requirements.
- If the changed code doesn't satisfy the requirements, or any of the above
command fails, think hard what needs to be done in one shot to satisfy the
requirements. And fix it till the code satisfies the requirements and all the
commands run successfully.
- After that, invoke **qa-validator** agent.
- For backend mode: Ask it to run integration test of latest change
- For frontend mode: Ask it to test the site using browser mcp tools
- As the last step of the task, Make sure none of the documentation is missing
or outdated. If anything is missing and outdated, update the documentation
accordingly using **documentation-updater** agent. This includes README files,
comments in the code, and any other relevant documentation.
- Commit any uncommitted files using the **Conventional Commit** skill to
generate a proper commit message (only if in git repository).
- Once it's done running, check the output file.
- For backend, it must be backend-validation.md file.
- For frontend, it must be frontend-validation.md file.
- Create a walkthrough of the completed task, which contains the following
- How to setup for the task, if it's backend, using curl commands, if it's
frontend, using Steps in UI
- What to run to verify the task end to end, including relevant curls and UI
steps
- What to verify, including database states, user states or other Curls that
verifies the task is completed successfully for humans
Save it to taskNotes/{ArgumentDirectoryName}/taskWalkthrough.md
- Read the files and think, are we ready to move to the next step? And based on
it, think, be pragmatic and suggest the next step.
- For backend, the next step should always be implementing frontend if there
is a frontend task
- For frontend, the next step should be releasing.
- IMPORTANT: Use the **Conventional Commit** skill for all commit messages.
Commit messages should not include any description - single line only.
- Push the code (only if in git repository).
Slash Command Analysis ▶
- Requires arguments: No
- Agent references: None
- Skill references: None
- Analysis version: 1.0
Convert to Different Formats
Actions
(Clears cached conversions and forces re-processing)