Skills · skills/cad-work-tracking/SKILL.md · Markdown

Work tracking: assume the session ends in 30 minutes

Plan as if this session can stop at any moment. Token budgets run out about every 30 minutes, workstations crash, and disks get reformatted. Anything that exists only in this session's context, in an uncommitted file, in a scratch or /tmp directory, on one machine's disk or in an agent's private memory is lost when that happens. GitHub is the record. A fresh agent on another computer must be able to continue from the issue, the branch and the PR alone.

The loop

  1. Find or open the issue first. Search before opening: gh issue list --state all --search "<words>". Open one per piece of work that will take more than a few minutes: gh issue create --title "<outcome, not activity>" --body-file <file>. Write the body with the template below. A large job gets a tracking issue that links smaller ones. Then check who holds it and claim it. Several agents on different tools and machines work the same repos. Read the issue's latest work-claim comments: if another agent holds an unexpired claim, pick other work or claim a separate scope. Otherwise post a claim before changing anything.
  2. Branch from the integration branch and push it at once. Follow the repo's AGENTS.md / CONTRIBUTING.md: in cad-agent that is a feat/<topic> worktree from origin/dev; in a product repo, often dev. Push before you have much to push (git push -u origin <branch>), so the branch exists remotely from the start.
  3. Open a draft PR early with Closes #<issue> in the body: gh pr create --draft --base <base>. List in it what is still missing. CI on a draft may fail; say why in the PR.
  4. Commit and push in clean chunks. One coherent change per commit (it builds, its message says what and why), pushed right away. Never batch an hour of work into one local commit. Generated files are committed only when they are regenerated by the committed sources (no hand-edited exports, no stale evidence).
  5. Checkpoint about every 30 minutes, and before anything long or risky. A checkpoint is:
    • commit and push everything worth keeping (WIP commits on your branch are fine; say WIP in the subject);
    • tick the issue checklist and add a short comment: what changed, what is running, the exact next step;
    • for each run in flight, the host, command, log path and how to collect its results (see cad-remote-runs). Ask yourself: "if this session ended now, could someone else continue from GitHub without asking me?" If not, checkpoint. Post it as a work-claim checkpoint so it renews your lease (at least once a day).
  6. Close out as you go. When a PR merges, its Closes #N closes the issue; check that it did, tick the tracking issue and comment with the merge commit. Close issues that turned out to be unnecessary, with the reason. Delete your own merged branches and remove your own worktrees (after checking no virtualenv imports from them); never touch another session's branch or worktree. End your claim with done (PR, commit, evidence), or release with resume notes if you stop before the end.

Work claims: sharing issues between agents

A claim is an issue comment whose first line the tools parse. No host names, user names or private infrastructure: agents are named by a stable pseudonymous tag. Always post a new comment; never edit an earlier one.

<!-- work v1 claim agent=a-7kq2m4xw lease=2026-11-01T19:00Z -->
**Claimed** by agent `a-7kq2m4xw` until 2026-11-01T19:00Z UTC.

Scope: <what this agent is doing on this issue>
Branch: <branch or PR>

The first lines of the other actions:

<!-- work v1 checkpoint agent=a-7kq2m4xw lease=2026-11-02T08:30Z -->
<!-- work v1 release agent=a-7kq2m4xw -->
<!-- work v1 done agent=a-7kq2m4xw -->

A checkpoint goes on with what was done and the next step, a release with resume notes, and done with the PR, commit or evidence.

Action When Lease
claim before starting until lease=, at most 24 h after the comment
checkpoint progress; at least once per lease renews lease=
release stopping before the end, with resume notes none: the claim ends
done PR merged or evidence posted none: the claim ends

What must never live only locally

Large or licensed inputs (vendor CAD, datasheets) stay out of git; the repo records where they come from and how to fetch them (a sources list plus a fetch script) so a reformatted machine can rebuild.

Resuming

At the start of a session, or after a crash, rebuild the state from GitHub before touching anything:

gh issue list --state open --assignee @me ; gh issue list --state open --limit 30
gh issue list --state open --search '"work v1" in:comments'  # issues with claims: read who holds what
gh pr list --state open --author @me
git fetch --all --prune && git status -sb
git log --oneline --branches --not --remotes                # commits on no remote: push them first
git stash list

Read the tracking issue's latest comment for the next step and the runs in flight; check each run's log on its host before starting it again (it may have finished). The cad-resume agent does this and reports a plan. If local commits exist that are not on the remote, push them first.

Issue template

<one paragraph: the outcome wanted and why; who asked and when>

**Done**
- [x] <step> (<commit or PR>)

**Next**
- [ ] <step, specific enough to start without asking>

**Running**
- <host>: `<command>`, log `<path>`; done when `<marker>`; collect with `<command>`

**Resume:** branch `<branch>`, PR #<n>. <anything a fresh agent must know first>

Rules that go with it