agentleFS
5uck1ess5uck1ess/devkit/skills/scratchpad/SKILL.md

scratchpad

Skill4 starsChanged 4 months agoMITView on GitHub

Persistent iteration memory — prevents Groundhog Day loops by recording what was tried, what failed, and what to try next.

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 4 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use scratchpads in any iterative loop to prevent repeating failed approaches.

    line 8
  2. Very specific:

    Create .devkit/scratchpads/ if it doesn't exist.

    line 14
  3. Very specific:

    Read .devkit/scratchpads/current.md if it exists.

    line 18
  4. Distinctive:

    Do not repeat a failed approach: If you're about to try something already listed as failed, stop and pick a different strategy.

    line 23
  5. Very specific:

    When the task succeeds or the workflow ends, delete .devkit/scratchpads/current.md.

    line 40
  6. Distinctive:

    Don't leave stale scratchpads — they'll confuse the next task.

    line 41
  7. Very specific:

    If .devkit/scratchpads/current.md shows 3+ failed iterations:

    line 45
  8. Distinctive:

    Keep entries concise — the scratchpad is read every iteration

    line 54

“Common” is measured: kept by at least 6 in 10 of the 6 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

Scratchpad Protocol

Use scratchpads in any iterative loop to prevent repeating failed approaches.

Location

.devkit/scratchpads/current.md — active scratchpad for the current task.

Create .devkit/scratchpads/ if it doesn't exist. Only one active scratchpad at a time.

Before Each Iteration

Read .devkit/scratchpads/current.md if it exists. Check:

  • What approaches were already tried?
  • What failed and why?
  • What was suggested to try next?

Do not repeat a failed approach. If you're about to try something already listed as failed, stop and pick a different strategy.

After Each Iteration

Append to .devkit/scratchpads/current.md:

## Iteration {N} — {timestamp}

**Approach:** What you tried (one sentence)
**Result:** pass | fail
**Details:** What happened — error message, unexpected behavior, or success details
**Next:** What to try next if this failed, or "N/A" if it passed

On Completion

When the task succeeds or the workflow ends, delete .devkit/scratchpads/current.md. Don't leave stale scratchpads — they'll confuse the next task.

Integration with stuck detection

If .devkit/scratchpads/current.md shows 3+ failed iterations:

  1. Stop iterating
  2. Review all failed approaches in the scratchpad
  3. The pattern of failures often reveals the real problem
  4. Escalate to the user with the scratchpad content as evidence

Rules

  • One scratchpad per active task — don't create per-agent scratchpads
  • Keep entries concise — the scratchpad is read every iteration
  • Record failures honestly — "it didn't work" is useless; "returned 404 because endpoint expects POST not GET" is useful
  • Clean up when done — stale scratchpads are worse than no scratchpads

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.