Comment /write-tests on a pull request and an agent writes tests covering the PR's changes, runs them against the branch, and pushes them to the PR's own head branch. GitHub is the supported provider at ship time.
- Identifier
write-tests-command- Version
- 1.0.1
- Steps
- 3
- Triggers
- 1
- ci
- testing
- slash-command
- interactive
- automated
When it runs
slash_command- Command
/write-tests
Only when all hold
- actor.username not contains [bot]
The pipeline
The graph below is the one the workflow opens with in the builder — same steps, same layout, drawn on the same canvas. The run playing through it is a simulation; the branches and conditions are real.
- 01/write-tests on a PR
triggerThe event that starts the run.
- 02Clone PR Head Ref
git.cloneShallow-clones the repository at the right ref.
- 03Write and Push Tests
agent.runOne agent works the task with its toolkit.
The agent
Test Author
- Base type
- Senior Developer
- Temperature
- 0.2
- Max iterations
- 45
- Tools
- 11
Git provider · 4
read_pull_requestRead Pull Request · readget_pull_request_diffGet Pull Request Diff · readcreate_or_update_fileCreate or Update File · writeadd_comment_to_pull_requestAdd Comment to Pull Request · write
Filesystem · 4
read_fileRead File · readlist_dirList Directory · readwrite_fileWrite File · writeedit_fileEdit File · write
Code search · 1
code_searchCode Search · read
Terminal · 1
run_terminal_cmdRun Terminal Command · write
Status · 1
update_statusUpdate Status · write
Related playbooks
Fix CI
Reads CI failure logs, locates the root cause in the diff, and pushes a fix.
Flaky Test Detector
Runs the test suite five times on the same commit and files a ticket for every non-deterministic test.
CI Duration Regression Watch
Weekly analysis of CI durations that identifies regressed jobs, opens the workflow definition, and proposes a specific cause and fix.