← ClaudeAtlas

git-branch-redo-from-scratchlisted

Use when a branch's code works but its implementation should be replaced from scratch rather than tidied — a proof of concept that became the real thing, an approach found halfway through that the earlier code does not reflect, or a structure that fights the problem. Studies the branch into a coverage ledger, treats its tests as the specification, reimplements from those requirements instead of copying the old code, then reconciles the result against the ledger entry by entry. The net change may legitimately differ from the original, which is kept as reference and fallback.
tony/ai-workflow-plugins · ★ 2 · AI & Automation · score 69
Install: claude install-skill tony/ai-workflow-plugins
# Redo from scratch Throw the implementation away and write it again, without losing what the original learned. Argument: $ARGUMENTS — a PR number, a branch, a statement of what should change about the approach, or nothing. Four references carry the parts that must not drift: - `references/rebuild-contract.md` — the contract, the coverage ledger, reconciliation, and what counts as done. - `references/branch-safety.md` — the gates, the backup, recovery, and the push. - `references/commit-messages.md` — style discovery, intent recovery, and the privacy gate. - `references/rebase-toolkit.md` — per-commit verification with no editor. ## Core principle The old branch is the specification, not the source. A redo that reads the old implementation line by line and retypes it has reproduced the shape it was called in to replace. Work from what the branch had to *achieve*; consult how it achieved it only when the requirement is ambiguous. ## Boundary the `git-branch-soft-reset-and-recommit` skill keeps the net change identical and rebuilds only the history. Reach for it when the code is right and the commits are wrong. This skill is the opposite trade: the history and the code are both replaced, and the net change may differ. That makes it strictly riskier, so it earns its safety from the contract rather than from a tree comparison. ## Phase 1 — Establish the contract before anything else Per `rebuild-contract.md`. Identify trunk's tests, the tests this branch add