explaingit

jaswalmohit8-collab/weasel

14Audience · developerComplexity · 1/5LicenseSetup · easy

TLDR

A single copyable CLAUDE.md config file that gives AI coding assistants six behavioral rules to prevent drifting, plan-rewriting, and looping during long work sessions.

Mindmap

mindmap
  root((weasel))
    Purpose
      Prevent AI agent drift
      Keep sessions on task
      Stop plan rewrites
    Contents
      CLAUDE.md rules file
      AGENTS.md companion
      Demo prompt
      Session screenshots
    Six rules
      Act after checks pass
      Use current evidence
      Keep state short
      Break loops early
    Usage
      Copy into any project
      Ask agent to read it
      Maintain state file
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Copy CLAUDE.md into any project to keep your AI coding assistant focused and on-task during long sessions

USE CASE 2

Use the state file pattern to hand off cleanly between multiple AI sessions without losing context on what was last verified

USE CASE 3

Paste the demo prompt into any capable AI assistant to test whether it stays grounded in under 60 seconds

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

Weasel is a single-file operating guide designed to keep AI coding assistants from falling apart during long work sessions. The problem it addresses is a specific kind of failure that shows up when you use tools like Claude or similar AI agents for extended tasks: the assistant starts drifting, rewriting plans instead of executing them, treating old notes as if they are still current, looping through the same checks without making progress, or narrating what it intends to do rather than actually doing it. The solution is a CLAUDE.md file, which is a special configuration file that AI coding assistants read at the start of a session to understand how they should behave in a given project. Weasel's version of this file gives the agent six compact rules: act only after checks pass, rely on current evidence rather than memory, keep state summaries short, break out of loops early, only update plans when behavior actually needs to change, and keep safety guardrails functional rather than treating them as excuses to avoid action. The repository also includes a companion file for agents that look for AGENTS.md instead of CLAUDE.md, a short demo prompt you can paste into any capable AI assistant to test the approach in about 60 seconds, and screenshots from demo sessions showing what a well-grounded agent response looks like versus the usual wall of status paragraphs. To use it, you copy CLAUDE.md into any project where you use a coding assistant and start the session by asking the assistant to read that file. For longer sessions, you can ask the assistant to maintain a small state file tracking the current task, the last action taken, what was verified, and what the next concrete step is. That state file is meant to be a handoff surface, not a diary. This is intentionally minimal. There is no framework, no server, no installation, and no hidden system. It is one copyable file, MIT licensed.

Copy-paste prompts

Prompt 1
I added weasel's CLAUDE.md to my project but my AI keeps rewriting the plan instead of executing it, which of the six rules covers this and how do I reinforce it mid-session?
Prompt 2
Generate a weasel-style state file for my current task: I am refactoring the auth module, last action was extracting the token validator, verified it passes unit tests, next step is updating the middleware
Prompt 3
I want to adapt weasel's CLAUDE.md for Cursor instead of Claude Code, which rules translate directly and what needs rewording for a different agent?
Open on GitHub → Explain another repo

← jaswalmohit8-collab on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.