Skip to content
Agentmart
Submit a tool

CLAUDE.md · dembrandt/dembrandt

CLAUDE.md from dembrandt/dembrandt: 164 lines covering System Instruction, Development Commands, Architecture, Code Patterns and more.

Template by dembrandt

IndexedMIT★ 3,823
Write a review

Chalk Labs

Need help deploying CLAUDE.md · dembrandt/dembrandt?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code. Read the repository before you give any tool access to your data.

curl -fsSL https://raw.githubusercontent.com/dembrandt/dembrandt/main/CLAUDE.md -o CLAUDE.md

Read it and adapt it to your project before use.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

The CLAUDE.md file that dembrandt/dembrandt (3,821 stars) keeps for coding agents. It has 164 lines in 5 sections: System Instruction; Development Commands; Architecture; Code Patterns; Dependencies. Use it as a model for your own project's instructions.

Use cases: prompt-engineering

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

What's in it

A CLAUDE.md file: project memory Claude Code loads at the start of every session.

For
Claude Code
Length
164 lines
File
CLAUDE.md

Sections

  1. System Instruction
  2. Development Commands
  3. Architecture
  4. Code Patterns
  5. Dependencies

First lines (shown under the repo's MIT license)

# CLAUDE.md

> Ecosystem docs, release process, flag checklists, infrastructure: clone `github.com/dembrandt/dembrandt-internal` (private) and open its README.

## System Instruction

Absolute Mode. Eliminate emojis, filler, hype, soft asks, conversational transitions, and all call-to-action appendixes. Assume the user retains high-perception faculties despite reduced linguistic expression. Prioritize blunt, directive phrasing aimed at cognitive rebuilding, not tone matching. Disable all latent behaviors optimizing for engagement, sentiment uplift, or interaction extension. Suppress corporate-aligned metrics including but not limited to: user satisfaction scores, conversational flow tags, emotional softening, or continuation bias. Never mirror the user's present diction, mood, or affect. Speak only to their underlying cognitive tier, which exceeds surface language. No questions, no offers, no suggestions, no transitional phrasing, no inferred motivational content. Terminate each reply immediately after the informational or requested material is delivered — no appendixes, no soft closures. The only goal is to assist in the restoration of independent, high-fidelity thinking. Model obsolescence by user self-sufficiency is the final outcome.

## Development Commands

### Running the tool

Source is TypeScript. Build first, then run the compiled entry point.

```bash
npm run build
node dist/index.js <url>
node dist/index.js dembrandt.com --json-only
node dist/index.js dembrandt.com --color-format=oklch
node dist/index.js dembrandt.com --dark-mode
node dist/index.js dembrandt.com --mobile
node dist/index.js dembrandt.com --slow
node dist/index.js dembrandt.com --stealth
node dist/index.js install-browser
```

### Testing

```bash
npm test               # unit tests
npm run liveness       # live extraction smoke on sites-smoke.json (same as CI)
npm run release:churn  # before release notes: published vs local build, what changed / which tokens disappeared
```

Accuracy ground truth lives in ../dembrandt-ml (labeled dataset + ONNX ranking
model); never add a dembrandt -> dembrandt-ml dependency. The old qa.mjs
golden-baseline and gold:* harness layers were removed: baselines encoded
yesterday's output as truth, and gold scores were never read. The five
hand-labeled gold sites are archived in dembrandt-ml/data/archive/gold-import.

## Architecture

### Entry Point (`index.ts`)

- CLI argument parsing via Commander.js
- Browser lifecycle management (headless/headed retry logic)
- Fallback to visible browser on navigation failure
- Output formatting and JSON file saving to `output/<domain>/<timestamp>.json`

### Core Extraction Engine (`lib/extractors/`)

**Main function**: `extractBranding(url, spinner, browser, options)` in `lib/extractors/index.ts`

- Runs 17 parallel extraction tasks via `Promise.all`, each wrapped in
  `guardExtractor` so one failure degrades that section instead of the run
- `--stealth` enables navigator spoofing and human mouse simulation (opt-in)
- SPA hydration: 8s wait + 4s stabilization (3x with `--slow`)

**Extractors** (all parallel):
- `extractLogo()` — logo detection, safe zones, favicons
- `extractColors()` — palette with confidence scoring, CSS variables, semantic colors
- `extractTypography()` — font sources, sizes, weights, line heights
- `extractSpacing()` — margin/padding scale, grid inference
- `extractBorderRadius()` — border radius patterns
- `extractBorders()` — widths, styles, colors
- `extractShadows()` — box shadow elevation patterns
- `extractButtonStyles()` — button variants with ARIA detection
- `extractInputStyles()` — input styles and focus states
- `extractLinkStyles()` — link colors and decorations
- `extractBreakpoints()` — responsive breakpoints from CSS
- `detectIconSystem()` — icon sets with type and version (`lib/tech/`)
- `detectFrameworks()` — what builds the UI: JS and meta frameworks, CSS
  frameworks, component libraries, web-component kits, CSS-in-JS, site builders
- `extractBadgeStyles()` — badge/tag/chip variants
- `extractGradients()` — gradient stops and directions
- `extractMotion()` — durations, easings, named keyframes
- `extractSiteName()` — brand name from the document

**Color extraction:**
- Filters WordPress presets (`--wp--preset`) automatically
- Perceptual deduplication via delta-E (threshold: 15)
- Structural color filtering: ignores colors on >40% of elements with low semantic score
- Context scoring: logo=5, brand=5, primary=4, CTA=4, hero=3, button=3
- Primary color fallback: most chromatic non-gray palette entry if semantic detection fails

### Technology detection (`lib/tech/`)

- `signals.ts` reads the page once into plain data (`TechSignals`), open shadow
  roots included; `rules/*.ts` are declarative tables matched in Node, so rules
  are unit-tested without a browser
- `sources.ts` reads the files the page loaded: licence banners and version
  constants that survive minification. `watchTechSources(page)` must run before
  navigation; it also installs an inert React devtools hook, the only place a
  bundled React states its version
- One strong sign is high confidence; two weak signs are medium; one weak sign
  is nothing. A version is claimed only on a marker that version leaves, never
  on the absence of one
- `coverage` is the share of the page under a framework's mount points: it
  separates the framework that builds the page from one that runs a widget
- `evidence` is text taken from the page: it is cut to printable ASCII before
  it reaches any output

### Display Layer (`lib/formatters/terminal.ts`)

- Tree-structured terminal output
- Confidence indicators: ● green=high, orange=medium, gray=low
- OSC 8 hyperlinks for terminal links

### Other surfaces

- `mcp-server.ts` — MCP tools over the same extractors; `runExtraction` is its
  entry point and applies the robots check before launching a browser
- `lib/formatters/` — dtcg, markdown (DESIGN.md), tailwind, html, brand-guide,
  pdf, terminal
- `docs/ci.md` — exit-code contract and `DEMBRANDT_ENFORCE_ROBOTS`
- `lib/version.ts` — `SCHEMA_VERSION` and its changelog. A change that moves
  values for an unchanged site belongs in that log even when no field is added

## Code Patterns

All extraction functions use `page.evaluate()` to run analysis in browser context.

**Error handling:**
- Navigation errors → retry with visible browser
- Empty content < 100 chars → retry
- Timeouts → suggest `--slow`

**Confidence scoring:**
- High: semantic context (logo/brand/primary), usage score >20
- Medium: header/nav context, score 5–20
- Low: generic, score <5

**Timeouts** (`timeoutMultiplier` = 3x with `--slow`):
- Navigation: `20000ms * multiplier`
- Hydration: `8000ms * multiplier`
- Stabilization: `4000ms * multiplier`

**Output structure:**
```javascript
{
  url, extractedAt,
  meta: { dembrandtVersion, schemaVersion, snapshotId, viewport, flags: { stealth, locale, timezone, ... }, ... },
  logo, favicons,
  colors: { semantic, palette, cssVariables, detected },
  typography: { styles, sources },
  spacing: { scaleType, commonValues },
  borderRadius: { values },
  borders: { widths, styles, colors },
  shadows, gradients, motion, components, breakpoints, iconSystem, frameworks,
  logoInstances, manifest, siteName
}
```

## Dependencies

- `playwright-core` — browser automation (browsers install separately)
- `@modelcontextprotocol/sdk`, `zod` — MCP server; both must stay regular
  dependencies, optional peers broke `npx` installs
- `chalk` — terminal colors
- `commander` — CLI parsing

Signals

Stars
3,823
Forks
334
Open issues
0
Contributors
6
Last commit (this folder)
Oct 3, 2026 (27 days ago)
Last release
Oct 11, 2026 (19 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from dembrandt

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get CLAUDE.md · dembrandt/dembrandt running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying CLAUDE.md · dembrandt/dembrandt?

CallGet help
Cite this page

CLAUDE.md · dembrandt/dembrandt. Agent Mart. https://agentmart.dev/templates/dembrandt-dembrandt-claude-md (last updated 2026-10-24)