SKILL.md--- name: running-tend description: Worktrunk-specific guidance for tend CI workflows. Adds codecov polling, Rust test commands, labels, and review criteria on top of the bundled tend-ci-runner skills. Use when operating in CI. metadata: internal: true --- # Worktrunk Tend CI Project-specific guidance for tend workflows running on worktrunk (a Rust CLI for managing git worktrees). The bundled `run-tend`, `review`, and `triage` skills provide the workflow framework; this skill adds worktrunk conventions. ## Filing issues in other repos Standing exceptions granted, each filing directly without asking permission here first: - agent-equipped targets (per **Filing issues** in the bundled `act-in-other-repos` skill) - any project the weekly digest finds copying Worktrunk's code without its license notice (`references/feedback-digest.md`, "Projects that copy Worktrunk's code") The default rule (open an issue here asking permission first) applies to every other target. ## Codecov Monitoring After required CI checks pass, poll `codecov/patch` — it is mandatory despite being marked non-required: ```bash for i in $(seq 1 5); do CODECOV=$(gh pr checks <number> 2>&1 | grep 'codecov/patch' || true) if echo "$CODECOV" | grep -q 'pass'; then echo "codecov/patch passed"; exit 0 elif echo "$CODECOV" | grep -q 'fail'; then echo "codecov/patch FAILED"; exit 1 fi sleep 60 done ``` If codecov fails **locally**, investigate with `task coverage` and `cargo llvm-cov report --show-missing-lines | grep <file>`. ### Investigating codecov failures in CI `task` and `cargo-llvm-cov` are not installed in the `tend-setup` action. Don't try to `cargo install` them in the sandbox — past attempts at source-compiling installs cascaded into bash-tool interrupts that blocked even `pwd` and `echo`. Instead, query Codecov directly, following `tests/AGENTS.md` → **Coverage Investigation** for the endpoints and their traps. The scratch paths there and below go to `${TMPDIR:-/tmp}` — write new ones the same way. If the Codecov API markers aren't enough, download the `code-coverage-report` artifact from the PR head's `coverage` workflow run — it contains a `cobertura.xml` with per-line hit counts: ```bash REPO=$(gh repo view --json nameWithOwner --jq '.nameWithOwner') # Find the coverage run on the PR head SHA: CI_RUN=$(gh api "repos/$REPO/commits/<sha>/check-runs" --jq '.check_runs[] | select(.name == "code-coverage") | .details_url | capture("runs/(?<id>[0-9]+)") | .id') # List artifacts, then download the coverage one: gh api "repos/$REPO/actions/runs/$CI_RUN/artifacts" --jq '.artifacts[] | {name, id}' gh api "repos/$REPO/actions/artifacts/<id>/zip" > "${TMPDIR:-/tmp}/coverage.zip" unzip -q "${TMPDIR:-/tmp}/coverage.zip" -d "${TMPDIR:-/tmp}/coverage" ``` ## Test Commands ```bash cargo run -- hook pre-merge --yes # full suite + lints cargo test --lib --bins # unit tests only cargo test --te