/paperthin:re0-workfrom paperthin
Restarts a project or artifact from v0 while preserving only proven lessons, contracts, gates, vocabulary, real-surface tests, and negative corpus. Use when the foundation is wrong or accumulated code is misleading progress.
Ships in paperthin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Restart a project or artifact at v0, carrying forward only what the previous cycle proved.
Give the next pass the old cycle's proof without its momentum: a new line that starts from what earned reuse and leaves the rest on record, never deleted.
A restart replaces a foundation, so it fits only a foundation that is wrong. Sound work keeps its line whatever the request calls the change: say the restart does not fit, leave the request to the procedure that owns it, and change nothing.
The steps assume a code repository. For a document, design or other artifact, steps 1 to 7 and 14 to 17 apply with its sections or parts as the layers, and steps 8 to 13 reduce to keeping the old version whole beside the new one.
Read the re0-memo of the cycle being replaced: the written measurement of where the old cycle stands, holding how far it is from its objective by its records, what failed and why, its sort of what earned reuse apart from what only looked productive, and the gates the next pass must clear, usually in a plan opened beside it. Then read the current plan, the user complaint that triggered the restart if any, and every local record store the old cycle kept outside its commits: domain notes, QA evidence, loop ledgers. Then account for each other file or folder the repository ignores, reading enough of it to tell a record from what a fresh install or build regenerates. No commit carries an ignored store through a restart, so one nobody accounted for is lost without anyone deciding to lose it. A restart with no measurement holding those parts stops here and asks for one, since a restart aimed without it repeats the old plan's picture of itself.
Enumerate every system the old cycle recorded its failures and decisions in, from that system's own state rather than anyone's memory of it: the tracker's open and closed issues, each pull request with its review threads and the findings its author did not take, CI history, incident and retrospective records, and the human's rulings. In CI history one item is a failed run on the main line or on a pull request that landed, numbered by its run id. Read every item in full, closed ones included, and start the record ledger beside the memo with one row per item saying what it recorded; a finding a pull request left open takes a row of its own beside that request's row, never in its place. A restart that carries only the failures someone remembers relearns the rest by failing them again.
Judge restart scope per layer from at least two independent cold reads of the old work, each by a reviewer who did not build it, on a different model or with a different brief: a layer whose responsibilities sit in the wrong places restarts; a layer that proved itself carries forward verbatim. When independent reads cannot be run, the split is provisional: say so, name the reads still owed, and never report a read that did not happen. A provisional split can be prepared but not handed off; the handoff waits for the owed reads or for the human to accept the split as it stands. Before reading a stage of the old work that produced nothing (no results, no passes, an empty output) as a fact about its code, check whether any input reached that stage; a stage nothing reached says nothing about its code.
Judge scope in time as well. A span of work that ran without the harness, hook or gate it depends on is not restarted; it stays and gets one more pass under that harness. Name the commit where the gap began, with its evidence, and keep every correction of fact and mechanical edit the repository's gates and CI passed. Redo only an artifact from that span that set a new plan or direction: a session that never read it writes the redo, which is laid beside the original rather than replacing it.
Split the old work into what to preserve and what to discard. The memo's sort of what earned reuse and what only looked productive is where the list starts, and the reads of step 3 settle each item. Preserve: contracts, schemas that survived QA, quality gates, vocabulary, reusable services, real-surface tests, each fix together with the test that proved it, negative corpus. Discard: explanatory UI, debug panels, scaffold, shallow generated content, accidental abstractions, code whose only value was learning what not to do. A module the brief mandates is never discarded for being unexercised; it carries forward with the phase that first exercises it. When the mechanism behind a mandated requirement is blocked, discard the mechanism and plan another; the requirement stays until its owner removes it.
Close the record ledger: every row takes one verdict from a closed set, with the evidence that verdict needs. kept names the test the preserve set carries to guard it and the red that test gave with the fix broken on purpose; designed out names the design that removes the failure; other owner names that owner; dropped gives the reason; missing names the owner who fixes it. A fix the preserve set carries without the test that proved it (a file copied from a commit after the fix, say) holds by luck: its row stays missing, its evidence starting luck:, until a test guards it. Each missing row is fixed now, turning kept once its test shows that red, or takes a row with its owner in the v0 plan at step 15, and step 17 builds nothing while one is neither; a run that ends before the plan is written lists each in its report's next steps.
Check the ledger against the stores. Write it as a table of four cells per row (item, what it recorded, verdict, evidence), the verdict as step 6 names it, the item as <store> #<n>, or <store> #<n>.<k> for a finding on its own row, with a one-word store name. Then, in the old line's checkout so each listing reads that repository, run:
node <this skill's folder>/scripts/record-ledger.mjs <ledger.md> [--store <name>=<listing command> ...] [--empty <name> ...] [--hand <name> ...]
Each listing command prints the numbers of the store's items as step 2 counts them, in every state and with no page cap, one per line or as a JSON array of numbers or of objects with a number field, and runs at check time, so an item opened after the ledger was written fails the check. The check cannot see a cap, and a default page drops the rest without a word, so compare each store's count on the pass line with the total the store itself reports. A listing that prints nothing could not answer, unless --empty <name>, given beside that store's --store, declares it empty. A store whose items carry no number (retrospective notes, rulings kept in prose) is numbered by hand, declared with --hand <name> and checked only for verdict and evidence; a row of a store given neither a listing nor that declaration fails, so a forgotten listing never passes. A finding row is checked for its request's number, its verdict and its evidence, never for whether every finding has one, so that coverage rests on step 2's reading alone, as a hand-numbered store's does. The pass line counts each verdict, the luck: rows apart, and the report gives both counts. Exit codes: 0 one row per listed item, each with a verdict from the set and its evidence; 2 a row missing, repeated, outside its listing, of an undeclared store, not written as an item, short of a verdict from the set and its evidence, or holding by luck under a verdict other than missing, with any listing that could not answer still named; 75 a listing could not answer and nothing failed, so the check is reported as skipped, never as passed; 1 usage or an unreadable ledger.
For a live system (a service, deployment or scheduled job), build v0 beside it on its own orphan branch and worktree. The old line takes only the fixes the live service needs, each mirrored into the v0 plan. v0 takes over only after a rehearsal on a copy of live data, a data migration the old code can still open, and a rollback drill that moves the main line back and forward again, all inside a window where the service can afford a missed run.
To replace a repository's main line, keep the old main history on the archive branch archive/<YYYYMMDD-HHMMSS>, named from the old tip's own commit time, never the wall clock.
Give every store the repository ignores a disposition, which the handoff script of step 12 takes as flags and refuses to go on without; a wholly ignored folder is one store. --ledger carries a file, folder or glob, and --leave <path>=<reason> leaves a store behind with the reason a later reader needs, such as installed dependencies a fresh install rebuilds. A store may be split, part carried and the rest left; a file named by both is carried. A store holding secrets or credentials is left, never carried, since the carried files are committed to a branch that gets pushed. The memo, its plan and the record ledger are carried with --ledger, never left, since the next cycle starts from them, and the report names where each landed: its path in the snapshot, in the archive branch's ledger commit unless the snapshot is its only address, and in the checkout. A carried file under the top-level docs/ is refused: every carried file ends up back in the live checkout, where a working file among the docs the live line tracks is one changed ignore rule from being tracked and shipped with them. So a memo, plan or record ledger kept under docs/ moves, before the script runs, to a place outside it that the ignore rules already keep out, such as the project's local notes folder, and the report names the move. The run rewrites every link to the moved file, and every relative link inside it, where it lives. In the carried files and the project's other ignored notes that edit is the whole change. A link in a tracked file is a change to the old line, which the human commits and pushes before step 12, since the handoff refuses pending changes and this skill commits nothing.
Choose where the carried files live. The script copies them into a snapshot directory outside the checkout, which must be new or empty, and writes RESTART-INVENTORY.md there: the restart's ledger of what the old line kept outside its commits, with each store's disposition, file count and reason, and each carried file's size and sha256. When the repository is public, or committing those records is unwanted, the snapshot is their only address and the archive branch is the old tip with no commit of its own (--snapshot-only). Otherwise the handoff block commits them, the inventory at the root, as the archive branch's final ledger commit, so negative corpus and ledger share one address.
Prepare the v0 line in the shape the repository's commit contract wants: a separate directory that becomes one root commit (--prepared), or, where the contract commits per unit, an orphan branch with one commit per unit (--prepared-branch). Carry forward only the preserve set and the ignore rules, without .git or the archive's ledger snapshot. Keep discarded tracked material on the archive branch; move any untracked negative corpus to an archive location before replacing the checkout, and never delete it. Choose the snapshot directory, the intended remote and an unused temporary orphan branch name, and resolve pending checkout changes, branch collisions, or a remote main that differs from the recorded old tip before preparing the handoff. Then run, from this skill's folder:
node scripts/restart-handoff.mjs --repo <path> (--prepared <directory> | --prepared-branch <ref>) [--remote origin] [--ledger <glob, file or folder>] [--leave <path>=<reason>] [--snapshot-only] [--snapshot <directory>] [--restart-branch restart-v0] [--archive-message <message>] [--restart-message <message>]
It needs Node 22 or later, git 2.36 or later, a local branch named main (the line it replaces) and a remote it can reach, and the block it prints needs a POSIX sh. It checks preconditions, passes every commit message the handoff makes or hands over through the repository's commit-msg hook, snapshots the carried ledgers with the inventory, and prints one POSIX shell handoff block with resolved paths and refs. An ignored store that would land in v0 stops the handoff: the script refuses a prepared branch that tracks one, and the block stops before the commit of a prepared directory that would take one, as it does when that tree lacks the ignore rules. Repeat --ledger and --leave for each store. Script exit codes: 0 printed block, 2 failed preconditions, 1 usage errors; a run that exits 2 stops on its failed preconditions.
13. Review the handoff block before anyone executes it. The archive is pushed first; then main moves to the v0 line (an orphan root commit renamed main, or a compare-and-swap onto the prepared branch) and is pushed with --force-with-lease=refs/heads/main:<old-tip>. Commit and push are deliberate human actions: the block carries a STOP immediately before each commit and push command, and neither the skill nor the script executes any of them. Unless the snapshot is the carried files' only address, the block copies the snapshot over each of them, so it first stops on any carried file edited since the script ran; rerun the script for a new snapshot then. Leaving the archive branch's ledger commit removes the carried files from the checkout, since that commit tracks them, and the block's next lines copy them back from the snapshot (from a directory, before the guard on the v0 commit); a block that stops in between leaves them for the human to copy back from the snapshot. After the human runs it, the included fresh-clone read-back must find the archive (holding every ledger, or at the old tip when the snapshot holds them) and main equal to the prepared line: exactly one commit from a directory, the branch tip from a prepared branch. The root commit made from a directory has a default message naming v0.1.0; a project whose version numbers carry on across the restart passes its own with --restart-message, and a prepared branch keeps the messages it holds. No tag is created. If the lease fails, stop and reconcile the changed remote tip before preparing a new handoff; never retry with an unconditional force-push.
14. Name the first quality gate before planning code: one the restart can clear on its own, such as a replay of the whole loop end to end. Choose it among the gates the memo's plan already carries. When none of them fits, write one that checks only that the restart's own loop runs end to end on its real surface, since a gate built from one of the memo's lessons is the memo's to write. A gate waiting on an outside event (real demand, a login, a third party's review) becomes an acceptance criterion tracked beside the plan, never the gate the first loop must clear.
15. Write the v0 skeleton plan, one complete vertical loop and a row for each missing row of the record ledger with its owner, into the plan the memo opened, or beside the memo when it opened none, so the next cycle starts from one plan. In a repository restart, write it once the human has run the handoff, since the plan is usually a carried file and the block of step 13 stops on one edited after the script ran.
16. Attack the v0 plan before anything is built from it, since a plan nobody tried to break carries its author's blind spot into the new line; this is the first move of an adversarial review, made here because this skill calls no other. Name the one assumption the loop rests on (that its input arrives, that its gate can be reached without an outside event, that a carried contract still holds) and the cheapest experiment that would break it: one call, one read, one counter-case put through the plan. Run the experiment when it is cheap and reversible. A plan it breaks is rewritten and attacked again; one whose experiment cannot run keeps that experiment as the first loop's first check, marked unverified. Write the assumption, the experiment and its result into the plan.
17. Build only that first loop, from the plan step 16 attacked. The run ends when it clears the gate, or, in a repository restart whose handoff the human has not run yet, after step 14, reporting the plan, its attack and the build as the next steps. Once the human has run that handoff, the next run, given that report, starts at step 15 on the new line: it reads the memo, its plan and the record ledger at the checkout paths the report names, and takes the first gate the report named.
missing row of the record ledger is not a lesson: it enters the plan as its own row with its owner.Before finishing:
kept row names a test seen red with its fix broken, every fix carried without its test is a missing row marked luck: and counted apart in the report, and every missing row is fixed or has its owner and a row in the v0 plan, or in the report's next steps when the run ended before the plan was written. The coverage check passed against live listings, every store it lists none for declared hand-numbered, or is reported as skipped with the listing that could not answer, never as passed; the report says that finding rows and hand-numbered stores rest on step 2's reading, not on the check.plan, has one complete vertical loop, and carries its attack: the assumption, the experiment, and its result or unverified mark.RESTART-INVENTORY.md gives every ignored store a disposition, and every store left behind a reason; the memo, its plan and the record ledger were carried, none from under the top-level docs/, and the report names where each landed; the handoff block names the timestamped archive branch, its ledger commit or the snapshot holding the ledgers, every push, and the clone read-back checking main equals the prepared line. Report execution results as unverified until the human runs them.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lilmgenius/paperthin --plugin paperthin45 skills in this plugin
/aimWhen data lands with a thin ask (files, a repo, a paste, a chat scrollback), read it and propose what the user is trying to do with it for them to confirm. Use the moment material arrives without a fully-formed ask, or when the ask reads thinner than the data suggests./autobahnCarve guardrail-adjacent items out of scope with safe alternatives before risk-adjacent work starts, then run the safe remainder at full strength in a fresh subagent that only ever sees the carved prompt, never the risky input. Use when a task includes stealth, scraping, privacy, IP, policy, licensing, security, or other safety-adjacent material that could be silently dropped, over-elaborated, or needlessly diluted. Fires on the impulse, not only the topic: the moment you notice yourself about to hedge, soften, silently skip, or brace for a refusal, carve before you execute./Other plugins' skills for the same job