agentleFS
yavorskyyavorsky/unbuilt.app/AGENTS.md

unbuilt.app

AGENTS.md95 starsChanged 9 months agoMITView on GitHub

Tech stack detection for websites via Playwright + pattern matching. Monorepo (yarn workspaces + turborepo): Example: adding a new state management library.

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository2 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Add to meta/index.ts with a Meta object:

    line 76
  2. Distinctive:

    Update web app types (if applicable):

    line 96

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “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
AGENTS.md

AGENTS.md — unbuilt.app

Tech stack detection for websites via Playwright + pattern matching.

Project Structure

Monorepo (yarn workspaces + turborepo):

apps/cli/          — CLI tool (`unbuilt <url>`)
apps/web/          — Next.js web app (unbuilt.app)
packages/analyzer/ — Orchestrates detection: navigates page, runs all detectors, two-pass analysis
packages/features/ — Detection categories & patterns (this is where you add new detections)
packages/helpers/  — Shared utilities
packages/resources/— Resource tracking (scripts, stylesheets, etc.)

How Detection Works

  1. Resources are collected from a live page (scripts, stylesheets, documents, headers, filenames)
  2. Patterns match against those resources using regex and browser checks
  3. Two-pass analysis: first pass detects everything independently, second pass runs dependencies checks so categories can reference each other's results
  4. Each category returns: { name, confidence, detectedFeatures, secondaryMatches }

Pattern Interface

interface Pattern {
  score: number;           // Weight (0-1). Higher = stronger signal
  name: string;            // Identifier for this pattern
  scripts?: RegExp[];      // Match against JS bundle contents
  stylesheets?: RegExp[];  // Match against CSS contents
  documents?: RegExp[];    // Match against HTML document
  headers?: Record<string, RegExp>; // Match against HTTP headers
  filenames?: RegExp[];    // Match against resource URLs
  browser?: (page, browser) => boolean | Promise<boolean>; // Runtime check
  dependencies?: (analysis) => boolean; // Cross-category dependency check (2nd pass)
}

Key Types

  • Pattern — packages/features/src/types/pattern.ts
  • FeatureResult — packages/features/src/types/feature.ts
  • CalculationResult — packages/features/src/types/feature.ts
  • AnalysisFeatures — packages/features/src/types/analysis.ts
  • AnalyzeResult — packages/analyzer/src/types.ts

Adding a Pattern to an Existing Category

Example: adding a new state management library.

  1. Create packages/features/src/categories/state-management/patterns/my-lib.ts:
export const myLib = [
  {
    name: 'coreBundle' as const,
    score: 1,
    scripts: [/my-lib-unique-marker/],
    filenames: [/my-lib/],
  },
  {
    name: 'apiUsage' as const,
    score: 0.8,
    scripts: [/useMyLib\s*\(/],
  },
];
  1. Add to patterns/index.ts:
import { myLib } from './my-lib.js';
export const patterns = { ...existing, myLib } as const;
  1. Add to meta/index.ts with a Meta object:
import { Meta } from '../../../types/meta.js';
// Add to meta object: myLib: { name: 'My Lib', website: '...', description: '...', Icon: null } satisfies Meta

Adding a New Detection Category

  1. Create packages/features/src/categories/my-category/ with:
    • patterns/ — individual pattern files + index.ts
    • meta/index.ts — Meta objects for each pattern
    • detect.ts — calls detectFeature() with type key
    • index.ts — re-exports detect, meta, patterns
  2. Register in:
    • packages/features/src/categories/index.ts — export * as myCategory from './my-category/index.js'
    • packages/features/src/index.ts — export category + meta
    • packages/features/src/types/analysis.ts — add to AnalysisFeatures
    • packages/analyzer/src/utils/analyze-feature.ts — import + add to detectionMap
  3. Update web app types (if applicable):
    • apps/web/src/app/utils/get-category-label.ts
    • apps/web/src/app/utils/get-technology-meta.ts
    • apps/web/src/server/utils/column-mapping.ts
    • apps/web/src/server/utils/extract-secondary-matches.ts
    • apps/web/src/server/utils/format-analyzis-response.ts

CLI Usage

# Basic analysis
yarn cli <url>

# JSON output
yarn cli <url> --json

# Agent-optimized compact output (for LLM context)
yarn cli <url> --format agent

# With local Chrome session for better accuracy
yarn cli <url> --session

Build & Test

yarn build          # Build all packages
yarn test           # Run tests
yarn lint           # Lint + fix

Categories

bundler, framework, uiLibrary, stateManagement, httpClient, router, translations, dates, stylingLibraries, stylingProcessor, transpiler, minifier, modules, monitoring, analytics, platform, tableLibrary, componentLibrary, animation, formLibrary, apiPattern

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.