# What Is Anchor Stripping in ADHD's Reframe Phase?

> Discover anchor stripping in ADHD's reframe phase. Learn how this LLM technique removes implementation details from problem statements to enable effective brainstorming.

- Repository: [Udit Akhouri/adhd](https://github.com/UditAkhourii/adhd)
- Tags: deep-dive
- Published: 2026-08-01

---

**Anchor stripping is a preprocessing mechanism in ADHD's reframe phase that uses an LLM to remove incidental implementation details—such as specific tech stacks, libraries, or current system architectures—from problem statements before divergent brainstorming begins.**

Anchor stripping is a core feature of the ADHD framework (UditAkhourii/adhd) that purifies problem statements during the initial reframe phase (phase 0). This process eliminates "load-bearing anchors" that tether solutions to existing implementations, allowing AI-generated branches to explore fundamentally different architectures without hidden biases toward current technology choices.

## How Anchor Stripping Works in the Reframe Phase

The reframe phase initiates every ADHD solving session by evaluating the `stripAnchors` flag, which defaults to `true` according to the type definitions in [`src/types.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/types.ts) (line 57). When enabled, the system invokes the `REFRAME_SYSTEM` prompt defined in [`src/engine.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/engine.ts) (lines 96-106), instructing the LLM to differentiate between incidental implementation details and immutable constraints.

According to the source code, the prompt specifically directs the model to strip "load-bearing anchors"—defined as incidental details like current technology stacks, specific libraries, or tool names—while retaining only immutable constraints such as legal, safety, or budget requirements. The LLM returns a JSON object containing the `raw` stripped problem text, which then feeds into all subsequent divergent branches defined in [`src/engine.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/engine.ts) (lines 321-340).

## Why Removing Implementation Details Matters

Eliminating implementation-specific anchors prevents the LLM from defaulting to familiar but potentially suboptimal solutions. Without anchor stripping, a problem statement mentioning "React" and "PostgreSQL" would bias every branch toward web stacks and relational databases, even when a mobile app or graph database might better serve the underlying requirements.

By contrast, the stripped problem description focuses purely on the functional need—such as "real-time sales data visualization"—allowing the system to explore diverse architectures ranging from static site generators to embedded systems. This ensures that solution generation rests on true constraints rather than historical accident.

## Configuring Anchor Stripping

While anchor stripping is enabled by default, ADHD provides multiple interfaces to disable it when implementation details are non-negotiable.

### Default Behavior (Anchors Stripped)

By default, `stripAnchors` is set to `true`. When you invoke the engine programmatically without specifying the flag, the system automatically processes the problem through the `REFRAME_SYSTEM` LLM call:

```typescript
import { run } from './engine';

// stripAnchors defaults to true
await run({
  problem: `Build a web dashboard using React that shows real-time sales data from our PostgreSQL DB.`,
});

```

The engine removes references to "React" and "PostgreSQL" before fanning out divergent branches, working instead from a purified description of the visualization requirement.

### Disabling via CLI

For command-line usage, pass the `--no-anchor-strip` flag parsed in [`src/cli.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/cli.ts) (line 67):

```bash
adhd solve "Create a dashboard for sales data." --no-anchor-strip

```

This preserves the original problem statement—including any mentioned technologies—for all subsequent reasoning branches.

### Programmatic Control

To disable anchor stripping programmatically, explicitly set `stripAnchors: false` in the run options:

```typescript
await run({
  problem: `Build a dashboard using Vue and MongoDB.`,
  stripAnchors: false,   // retain implementation details
});

```

This configuration bypasses the `REFRAME_SYSTEM` preprocessing step, feeding the raw problem text directly into the divergence phase.

## Summary

- Anchor stripping runs in ADHD's reframe phase (phase 0) to clean problem statements of implementation-specific details.
- The `REFRAME_SYSTEM` prompt in [`src/engine.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/engine.ts) distinguishes between mutable implementation anchors and immutable constraints.
- By default, `stripAnchors` is `true`, but you can disable it via the `--no-anchor-strip` CLI flag or by setting `stripAnchors: false` programmatically.
- Removing anchors prevents solution bias toward current tech stacks, enabling exploration of fundamentally different architectures.

## Frequently Asked Questions

### What counts as an anchor in ADHD?

In ADHD's reframe phase, an anchor is any incidental implementation detail that ties a problem to a specific technology, tool, or current system architecture—such as "we use React" or "data lives in PostgreSQL." Immutable constraints like legal requirements, safety standards, or fixed budgets are explicitly preserved and not considered anchors.

### Can I disable anchor stripping for specific problems?

Yes. You can disable anchor stripping for individual runs by passing the `--no-anchor-strip` flag when using the CLI (handled in [`src/cli.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/cli.ts)), or by setting `stripAnchors: false` in the options object when calling the `run()` function programmatically as defined in [`src/types.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/types.ts).

### How does anchor stripping improve AI brainstorming?

Anchor stripping improves divergent brainstorming by ensuring the LLM cannot fall back on familiar implementation patterns mentioned in the original problem. By removing references to specific stacks or tools, the system explores solution spaces based purely on functional requirements and immutable constraints, often revealing architectures that wouldn't emerge from anchored reasoning.

### Where is the reframe phase implemented in the codebase?

The reframe phase logic resides primarily in [`src/engine.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/engine.ts), specifically lines 96-106 where the `REFRAME_SYSTEM` prompt is defined, and lines 321-340 where the anchor stripping execution occurs. The configuration interface is declared in [`src/types.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/types.ts) (line 57), while CLI argument parsing appears in [`src/cli.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/cli.ts) (line 67).