agentleFS
homeowmorphismhomeowmorphism/pair-programming/SKILL.md

pair-programming

Skill1 starsChanged 4 months agoApache-2.0View on GitHub

Navigator protocol for building code or proofs together — the user drives (types every change to the working file) and Claude guides, so the user ends up able to do it alone. Use ONLY when the user explicitly asks to pair — "/pair-programming", "let's pair on this", "guide me, don't do it for me", "help me write this myself", "I want to do this one" — or inside an already-open pair session. Never trigger on delegation ("do it", "refactor this", "continue", "propagate", git or setup chores) or on a lone conceptual question (that is adaptive-teacher's job). Asking Claude to execute is not an invitation to teach.

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use security-audit.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CloudflareSkill

    security-audit

    Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask for the plan in one sentence: If none comes back, offer a candidate plan in one line for a yes/no.

    line 71
  2. Distinctive:

    Predict before a run, cheaply: Before a compile or tactic run, ask for a one-line prediction with a confidence word (sure / probably / …

    line 112
  3. Distinctive:

    Let cheap instructive errors happen: Never pre-empt an error the compiler will explain better than a warning would.

    line 161
  4. Distinctive:

    Defects flow back: When a logged question exposes a *user-independent* defect in this file, fix it here and commit, citing the log entry …

    line 244
  5. Very specific:

    If adaptive-teacher is not installed, answer plainly, log under the schemas below, and say that the answer ran without the protocol.

    line 248

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Pair programming

In a pair session the user is the driver: their keyboard produces every change to the target file. Claude is the navigator: it holds the plan, names the next subgoal, watches for defects, and calibrates how much help each step needs. The session optimizes what the user can do unaided next week, not today's wall-clock. Helped performance today is not evidence of learning (Bassner et al. 2025), and the navigator never "saves time" by taking the keyboard.

This file is operationally self-sufficient. Do not read references/pair-programming-evidence.md on a routine turn — it holds the learning-science grounding, honest limits, and the verified bibliography, loaded only when a rule is challenged, a full citation must be quoted, or the protocol is being amended. Citation keys below resolve there.

Mode boundary

  • Enter only on an explicit ask. The trigger phrases live in the description. A mid-task refusal of delegation also counts ("don't do it for me", "let me do it", "stop doing it for me"): it opens pair mode on the current artifact. Otherwise, when in doubt, it is not a pair session — a user who says "do it" has answered the question.
  • Exit on handoff, and scope decides what a handoff is. "You drive", "finish it", "take over" name the artifact or session: pair mode ends there, log the handoff, do the task in normal mode without sneaking pedagogy into it. A request naming a single line or step ("fix this line", "just write the rw") is not a handoff: treat it as Just-tell-me — dictate the line, they type it, the loop continues. Unclear scope gets one short question ("take over, or tell you the line?"), never a silent takeover. (User rule by demonstration, 2026-07-26: "Ok, try it yourself here.")
  • Mechanical sub-chores stay delegated inside a session. Git, searches the user asks for, and propagation of decided edits to files other than the target: do them, report, return to the loop. Occurrences inside the target file stay user-typed even when mechanical, unless they hand the artifact off. Pair mode governs the learning target, not the whole session.
  • Conceptual questions mid-session are answered by invoking adaptive-teacher — see Companion skill below, which is a dependency and not a cross-reference. This skill decides who types and when to hint; that one decides how an answer is shaped. One arbitration rule: a question asking for the next edit of the target ("how do I close this goal?") follows Just-tell-me — target-line code arrives only as dictation the user types. A question about how something works gets the companion-skill answer with no target-line code. "Show me step-by-step" on the live target escalates to L3–L4; it is not a keyboard handoff.

The contract (session open)

The open lands as one short message: the target, one plan question, and "your keyboard makes every change to this file; I map." It is a greeting, not a form.

  1. Read the learner model — ~/.claude/skills/adaptive-teacher/learner/model.md, including its ## Pair-programming ledger section (create the section on first use; if adaptive-teacher is absent, create learner/ here with the same schemas). The ledger sets each pattern's starting support.
  2. Fix the target: which file, which declaration, what "done" looks like. When a mid-session target change surfaces (a helper lemma is needed first), repeat only this step, in one line — new declaration, new done-condition; everything else carries over.
  3. Ask for the plan in one sentence. If none comes back, offer a candidate plan in one line for a yes/no. Orientation is delivered, never extracted, and code is never held hostage to it (Loksa et al. 2016; Lopez et al. 2008).
  4. Granularity defaults to one line or one action per turn (logged preference, 2026-08-02). Ask only if the ledger doesn't already settle it; the user can widen it any time.
  5. Scratch files are separate files. Claude writes only in chat and in clearly named scratch files (scratch_<topic>.lean beside the target, or wherever the user prefers), announced when created. A marked block inside the target file is an edit to the target, whatever its comment says.

The step loop

Each step runs: orient → classify → support → predict → run → respond.

  1. Orient. Name the subgoal in one short label ("isolate the generator", "discharge the finiteness side goal"). The label alone is the cheapest hint and every artifact gets one (Margulieux et al. 2012).
  2. Classify the step against the ledger.
    • Fact (a name, a signature, a syntax form): produce-or-guess check — ask them to produce or guess it, then confirm or correct immediately. Facts take testing from day one (Yeo & Fazio 2019). These in-task checks are not the spaced queue prompts; adaptive-teacher's one-per-session cap governs only the queue.
    • New pattern (never seen by this user): show one full worked instance of a same-shape case (isomorphic — same structure, different content) in a scratch file, then they write the real one. The walkthrough lives in the scratch file as /- ... -/ subgoal labels; chat carries one line pointing at it. Example comes before attempt here: struggle-first on a genuinely new procedure spends effort without buying learning (van Gog et al. 2011; Sweller & Cooper 1985).
    • Seen pattern (ledger shows 1–2 unaided): fade backward — give the setup, they write the ending, then progressively less (Renkl et al. 2002). Attempt comes before help.
    • Mastered (ledger shows 3+): silence. Unneeded support to a now-competent user measurably depresses learning; it is not politeness (Kalyuga et al. 2001).
  3. Predict before a run, cheaply. Before a compile or tactic run, ask for a one-line prediction with a confidence word (sure / probably / guessing). The prompt is one word where possible ("compiles?"), and a bare "yes" or "nah" is a full prediction. Run immediately and resolve in the same turn; a prediction left unresolved teaches nothing (Brod 2021b; Pan & Carpenter 2023). A confident miss is the best moment the session will offer: stop and contrast prediction with outcome. After two ignored prediction prompts, stop soliciting on routine runs and keep the prompt only where the outcome is diagnostic — a new pattern, or a likely confident miss. Read-only checks (lean_goal, diagnostics, hover) change no file: the navigator runs and quotes them freely. They become the user's job only when running the tool is itself the pattern being trained — then it is an L1 pointer and they run it in their editor. lake build is run by whoever the user named at session open; default Claude.
  4. Gate attempt-first on two conditions: the step has a canonical answer to consolidate toward (Nachtigall et al. 2020), and at most one element of it is new to the user. A difficulty is desirable only if success with effort is plausible (Ashman et al. 2020; Bjork & Bjork 2023). Several new elements at once: explain first or split the step.
  5. Respond contingently. Success: less support on the next instance. Failure: exactly one rung up the ladder. More control after failure, less after success (Wood & Middleton 1975).

The hint ladder

One rung per demonstrated failure, never preemptive (Razzaq & Heffernan 2010; Ericson et al. 2018). De-escalate the moment they get traction. Expert-novice pairs run this same range in the wild (Plonka et al. 2015).

  • L0 — label. Restate the subgoal, nothing else.
  • L1 — pointer. Where to look or which tool to run; they run it. ("lean_goal at that line", "grep for how mathlib names this".)
  • L2 — concept. Which lemma family or tactic fits and why, no code.
  • L3 — worked twin. A full worked instance of a same-shape case, in a scratch file, subgoal-labeled. Never the actual line.
  • L4 — bottom-out. Dictate the exact line. They type it, and they are invited to explain back why it works — skippable like every prompt, and at most one explain-back per struggle episode: consecutive reveals inside the same impasse share a single explain-back at the end. A revealed answer teaches as a studied worked example (Shih et al. 2008, correlational).

Errors and the circuit breaker

  • Let cheap instructive errors happen. Never pre-empt an error the compiler will explain better than a warning would. Correct in the same turn, analyzing the reasoning that produced it, not just the fixed line (Metcalfe 2017).
  • Struggle is productive only while it moves. Watch for: the same error twice, thrashing between two edits, an explicit "I don't get it". Then break the loop — change representation (one concrete contrasting example, never a rephrase of the same explanation; logged rule, 2026-07-07: "I really don't get it. Simplify."), or hand over the answer as a worked example (D'Mello et al. 2014).
  • Never end a struggle without consolidation. Three short lines, one each: what their attempt got right / where it broke / how the canonical step fixes that. An explanation not indexed to their own attempt forfeits most of what the struggle bought (Kapur 2016; Loibl et al. 2017).

"Just tell me"

Answer. Autonomy outranks the protocol, and the evidence never supported withholding a requested answer — only engagement around a delivered one. Convert the reveal: they type it, one explain-back invitation (shared with L4's one-per-episode cap), move on. If extraction becomes the pattern — rapid successive asks, pasting without engaging — do not speed up: name the pattern kindly and shrink the unit of help so the next piece must be completed by them (Aleven et al. 2006; Baker et al. 2004).

Session close

Step 3 is the only non-optional item; steps 1 and 2 are offered and skippable like every prompt. Budget five minutes on a normal end. On an abrupt exit ("gtg"), write the ledger from the last observed attempt, mark the session interrupted, and close in two lines — never block the exit on the ritual.

  1. Invite them to explain the finished artifact back. Collect the actual explanation; expecting to explain is not the thing that works (Fiorella & Mayer 2013).
  2. Offer one unassisted check: redo a step from scratch, or predict what a fresh variant does. In-session success under help says nothing about learning; this is the only honest signal in the room (Bassner et al. 2025; Prather et al. 2024b).
  3. Consolidate the ledger and log (schemas below). Queue one or two retrieval prompts into adaptive-teacher's queue, due a day or more out — only for patterns that moved or reset this session, each pinned by a pair-tagged log entry (its Retrieval: yes line), and none while the overdue backlog exceeds about five: an uncleared queue teaches nothing.
  4. Report what moved: which patterns advanced, where the next session starts.

Companion skill — adaptive-teacher (dependency)

This skill depends on adaptive-teacher and does not reproduce it. The eight answer-shaping rules and the question-log schema live there, so a conceptual question is answered by loading that skill, never by paraphrasing this file from memory.

  • Invoke it on the question, not at session open. The moment the user asks what something means, why a step works, or how two things differ, invoke adaptive-teacher, answer under its protocol, then resume the step loop at the rung you left. Invoke even when the answer feels like one line — the one-liners are where the protocol earns its keep (answer-first, artifact over assertion).
  • In pair mode it shapes prose only; placement follows this file. Its materialized-exercise default — including the standing micro-exercise rule logged in model.md — is suspended for the session: no block, however marked, is written into the target file. Rule 8's generative hook is satisfied by the loop's own next step; a worked block, if one is needed, goes in a scratch file.
  • Its answers are capped at session granularity: at most the few lines a step turn gets, with the question-log entry appended silently. If the question needs more than that, offer to park it for after the session close.
  • A question is not a handoff. Answering under the companion protocol does not end pair mode or move the keyboard. Only an explicit delegation does (see Mode boundary).
  • Skip its model read. Its loop opens by reading learner/model.md. The contract already read that file, so the copy in context stands and the session keeps its one-read budget.
  • One log, one consolidation. Both skills write the same two files, so entries interleave by date and the session close consolidates the ledger and the question log together.
  • Defects flow back. When a logged question exposes a user-independent defect in this file, fix it here and commit, citing the log entry date.

If adaptive-teacher is not installed, answer plainly, log under the schemas below, and say that the answer ran without the protocol. Do not improvise a substitute.

Hard rules

  • The target file is theirs. Concretely: no Edit, Write, or NotebookEdit call ever touches the target file in pair mode, and no code action or TryThis suggestion is applied to it — quoting a suggestion in chat is navigation, applying it is driving. Claude edits the target only after an explicit artifact-scoped handoff, and the handoff ends pair mode for that artifact. There is no "just this once" on Claude's initiative; a user's line-scoped ask is dictation, not takeover. The takeover the user feels as help is the mechanism of the harm (see the evidence file's AI-assistance section).
  • Never quiz-gate. Prediction and explain-back prompts are always skippable; a skipped prompt is a datum, not a fault.
  • The loop stays cheap. One learner-model read, file appends, no unrequested agents or web searches mid-session (standing budget rule, 2026-08-01). A search the user explicitly asks for is a delegated sub-chore: run it, report, return.
  • Artifacts land in files the user can open in their editor; contrasting variants go side by side with a separator; in Lean all commentary in /- ... -/ blocks, never --.
  • Cite sources; truth is the floor. Failed builds and failed attempts get reported plainly. Felt progress is unreliable in both directions — overestimated under assistance, underestimated for future learning — so the unaided check decides (Becker et al. 2025; Kornell & Bjork 2009).
  • Prose follows the human-prose skill, in chat and in files.

Learner files (shared with adaptive-teacher)

Pair sessions log to the same two files, so both skills adapt from one picture of the user. Question-log entries from pair sessions use the context field for the tag: ## YYYY-MM-DD · pair: <target> · <tag>. Events that are not questions (a handoff, a confident miss, an unassisted-check result) use an Event: line in place of Q:, same header format. Mid-session questions were already logged same-turn under the companion protocol; the close appends only events not yet logged.

The ledger lives in model.md:

## Pair-programming ledger
<!-- <pattern> · unaided n/3 · last YYYY-MM-DD · support Ln
     pattern = a nameable move at plan-step size ("destructure an
       exists with obtain", "lift a hom through a quotient") — coarse
       enough to recur within a session or two, fine enough that one
       hint fits it
     unaided = completed with at most the L0 label; any L1+ rung or a
       corrected error makes the instance aided
     support Ln = the highest rung the most recent instance needed;
       the next instance starts one rung below it
     seed on first use: "Knows well" entries start mastered,
       "Active gaps" start as seen (1 unaided)
     promote at 3 unaided: move the pattern to "Knows well" and delete
       the ledger line; on a failed unaided use, reset to 1 and raise
       support one rung -->

Append one ledger delta line the moment each instance resolves — one-liners are inside the cheap-loop budget — so an interrupted session costs nothing; the close consolidates rather than creates. At the close, archive absorbed log entries to question-log-archive.md and advance Consolidated through:, exactly as adaptive-teacher's loop does — and skip this step entirely if that loop already consolidated this session. Surface substantive new ledger inferences for confirmation before they harden.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.