gitwtfhub

wtf is auto-thinking-pi?

acoyfellow/auto-thinking-pi — explained in plain English

Analysis updated 2026-05-18

10TypeScriptAudience · developerComplexity · 3/5Setup · moderate

TL;DR

A Pi coding agent extension that uses local rules, not an AI call, to auto-set reasoning effort per prompt.

Mindmap

mindmap
  root((auto thinking pi))
    What it does
      Classifies prompt difficulty
      Sets Pi thinking level
      No extra model call
    Signals used
      Keywords
      Word count
      Code blocks
    Features
      autothink command
      Decision history
      Exported classifier
    Requirements
      Bun runtime
      Pi coding agent

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

Why would anyone build with this?

REASON 1

Automatically set a higher reasoning effort for Pi when a prompt looks difficult.

REASON 2

Inspect the last 20 auto-thinking decisions with the /autothink status command.

REASON 3

Import the classify function directly to score prompt difficulty in other Bun code.

REASON 4

Tune the classifier's keyword and scoring rules to match your own team's prompt style.

What's in the stack?

TypeScriptBunBiome

How it stacks up

acoyfellow/auto-thinking-pibbdaii/three-pivot-controlscodee-sh/payload-training-app
Stars101010
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasymoderate
Complexity3/52/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires Bun and an existing Pi coding-agent installation, not published to npm, install by cloning.

Wtf does this do

This project is an extension for a coding agent called Pi. Its job is to look at each prompt a user types and decide, before Pi starts working on it, how much reasoning effort Pi should apply to that turn, ranging from off up to a high effort level. It makes this decision using a small set of local rules rather than by making an extra call to an AI model, so the classification itself is instant and free. The classifier looks at things like whether the prompt contains certain keywords that suggest a hard task, whether it contains words suggesting a trivial task, how many words are in the prompt, whether it includes code blocks, and whether it references specific files. Based on a scoring system built from these signals, it maps the prompt to a reasoning level such as off, low, medium, high, or extra high, and calls a function that tells Pi to use that level for the upcoming turn. It never changes or rewrites the user's actual prompt text. Inside Pi, a command called autothink lets a user turn the feature on or off and inspect the last twenty decisions it made, including the prompt snippet, the level chosen, and a short human-readable reason. The classifier code is also exported separately so it can be imported and used directly from other TypeScript code running under Bun or Pi. The project deliberately treats under-thinking, meaning applying too little effort to a genuinely hard prompt, as worse than over-thinking, so it includes a safety floor that pushes ambiguous prompts toward at least a medium effort level rather than risking a rushed, low effort answer. The README documents how to add your own test prompts to tune the classifier for a different workload, along with the exact scoring rules and thresholds used. This is only usable inside the Pi coding agent ecosystem. It requires the Bun JavaScript runtime, is not published to a package registry, and is installed by cloning the repository or loading it directly into Pi from a local path.

Yoink these prompts

Prompt 1
Walk me through installing this Pi extension and loading it with the pi -e command.
Prompt 2
Explain how the classify function scores a prompt into off, low, medium, high, or xhigh.
Prompt 3
Show me how to add new test cases to test/cases.json to tune this classifier.
Prompt 4
Explain why this project uses local heuristics instead of an extra model call.

Frequently asked questions

wtf is auto-thinking-pi?

A Pi coding agent extension that uses local rules, not an AI call, to auto-set reasoning effort per prompt.

What language is auto-thinking-pi written in?

Mainly TypeScript. The stack also includes TypeScript, Bun, Biome.

How hard is auto-thinking-pi to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is auto-thinking-pi for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.