| name | clean-up |
| description | Clean up the current branch in the Robot SF repo by following docs/dev_guide.md and reusable scripts/dev commands; use when asked to tidy a branch, run Ruff format/fix, or run parallel pytest before sharing changes. |
| category | validation |
| kind | atomic |
| phase | verification |
| requires_write | true |
| requires_slurm | false |
| requires_benchmark_artifacts | false |
| delegates_to | [] |
| output_schema | skill_run_summary.v1 |
Clean Up
Purpose
Run the repo-standard cleanup pipeline for the current branch: formatting, automated checks,
parallel tests, and diff-based quality gates.
Workflow
- Confirm context:
- Check for repo markers (
.git, docs/dev_guide.md, .specify/memory/constitution.md).
- Read
docs/dev_guide.md, .specify/memory/constitution.md, and .github/copilot-instructions.md.
- Prepare environment:
- If
.venv is present, use it.
- If missing, run
uv sync --all-extras, source .venv/bin/activate, and uv run pre-commit install.
- Format and lint:
scripts/dev/ruff_fix_format.sh
- Re-run until the script is clean.
- Run tests:
scripts/dev/run_tests_parallel.sh
- Optional:
--new-first or --no-fast-fail as needed.
- Run diff quality gates:
BASE_REF=origin/main scripts/dev/check_changed_coverage.sh
BASE_REF=origin/main scripts/dev/check_docstring_todos_diff.sh
- Report:
- Summarize passed/failed commands and any residual risk blocks (flaky or deferred tests).
- Worktree hygiene:
- Treat removal of no-longer-needed worktrees as part of normal closeout after PR review, issue
implementation, publishing, or abandoned exploration.
- Follow
AGENTS.md "Worktree Teardown And Preservation" before removing or pruning anything.
- Inspect
output/ and other ignored local artifacts before cleanup; classify them as
disposable, ignored-cache, tracked-manifest, durable-required, or handoff-needed.
Guardrails
- Fix failures with intent; do not silence value-heavy tests without explicit direction.
- If touched tests were added, verify those new tests locally.
- For rendering or benchmark-affecting work, keep GUI/benchmarks in follow-up if required and noted.
- Do not remove dirty or unpushed worktrees as part of cleanup unless preservation is explicitly
recorded.
Output
- Commands executed and pass/fail status.
- List of remaining failures and the decision (fix, defer, investigate).
- Remaining follow-up tasks before merge-ready handoff.
- Any worktree or artifact cleanup inspected, preserved, skipped, or deferred.
When to use
Use this skill for the scope named in its frontmatter description and registry metadata.