agentleFS
MicrosoftKnown publishermicrosoft/lage/AGENTS.md

lage

AGENTS.md817 starsChanged 4 months agoMITView on GitHub

Lage ("make" in Norwegian) is a task runner for JavaScript/TypeScript monorepos. It pipelines npm scripts across packages so that, for example, test can start as soon as its own package's build finishes rather than waiting for all builds. This is a Yarn Berry (v4) workspace monorepo with ~28 packages under packages/. These commands work from the repo root. Before finalizing changes, run yarn ci from the root for complete build/test/lint verification. These commands can be used to verify changes to…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 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

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    Before finalizing changes, run yarn ci from the root for complete build/test/lint verification.

    line 28
  2. Very specific:

    If changes span multiple packages, you should yarn build from the root instead of one package.

    line 44
  3. Very specific:

    Consistent type imports required: use import type { Foo } or import { type Foo, ValueBar }

    line 83
  4. Very specific:

    Every PR must include a beachball change file.

    line 94

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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

This file provides guidance to AI agents when working with code in this repository.

What is Lage?

Lage ("make" in Norwegian) is a task runner for JavaScript/TypeScript monorepos. It pipelines npm scripts across packages so that, for example, test can start as soon as its own package's build finishes rather than waiting for all builds. This is a Yarn Berry (v4) workspace monorepo with ~28 packages under packages/.

Common commands

Repo root commands

These commands work from the repo root.

yarn build              # transpile + types + bundle (via lage)
yarn test               # run all packages' tests (via lage; does NOT accept jest options)
yarn lint               # lint all packages (via lage)
yarn api                # update API report files (via lage)
yarn ci                 # full CI: transpile, types, build, test, lint, bundle, api (via lage)
yarn format             # prettier --write
yarn format:check       # prettier --check
yarn checkchange        # validate change files exist
yarn deps:check         # dependency audit (depcheck)
yarn lage-local         # run the locally-built lage CLI (node packages/lage/dist/lage.js)

Before finalizing changes, run yarn ci from the root for complete build/test/lint verification.

Single-package commands

These commands can be used to verify changes to a single package if you run cd packages/<name> before running the command.

cd packages/<name>
# then run a command
yarn build  # single-package transpile + types
yarn test   # single-package run all packages' tests (accepts jest options)
yarn test --testNamePattern="pattern"  # specific test by name
yarn lint   # single-package lint all packages
yarn api    # single-package update API report files

If changes span multiple packages, you should yarn build from the root instead of one package. This is the best way to ensure all dependencies build in proper order.

Architecture

Key packages

  • lage — CLI entry point, esbuild-bundled into dist/lage.js
  • cli — CLI implementation (depends on nearly all other packages)
  • scheduler — Task scheduling engine
  • target-graph — Builds the dependency graph of tasks (targets) across packages
  • runners — Task runner implementations (npm script, worker)
  • cache — Caching layer (wrapping backfill-cache)
  • hasher — Content hashing for cache invalidation
  • config — Configuration loading via cosmiconfig
  • worker-threads-pool — Worker thread management
  • reporters — Output formatting

The repo also contains the backfill family of packages. backfill is the underlying caching library for lage.

  • backfill — CLI entry point (yargs-based), not directly used by lage
  • backfill-cache — Cache providers (local tar + Azure blob storage)
  • backfill-config — Configuration loading (find-up based)
  • backfill-hasher — Git-based content hashing (lage uses some of the utilities but not the main Hasher class)
  • backfill-logger — Logging and output handling

The workspace-tools helper library is also hosted in this repo.

Shared tooling (scripts/ package)

@lage-run/monorepo-scripts (aliased as monorepo-scripts bin) provides shared build commands (transpile, lint, etc) used by all packages. Shared configs live in scripts/config/ (jest, eslint, tsconfig base).

Output convention

  • lib/ — transpiled JS + type declarations (all packages except lage)
  • dist/ — esbuild bundle (lage package only)

Code style

  • TypeScript strict mode, ES2020 target, CommonJS modules
  • Consistent type imports required: use import type { Foo } or import { type Foo, ValueBar }
  • File extensions required in TS imports: e.g., import { foo } from "./foo.js"
  • No require() in .ts files
  • No console.log — use the logger package
  • No floating promises — all promises must be awaited
  • Explicit return types on exported functions
  • Prettier: 140 char width, double quotes, 2-space indent, LF line endings
  • Pre-commit hook runs prettier via lint-staged

Versioning & release

Every PR must include a beachball change file. Use the /beachball-change-file skill to create one.

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.