RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/CLAUDE.md/carrot-foundation/middle-earth

CLAUDE.md

CLAUDE.md
CLAUDE.mdroot

Quality

97/100

Scores the file, not the repository.

Length

780 words

39 headings · 7 code blocks

Repository

0

— · pushed 4 days ago

Last changed

3 days ago

First indexed 3 days ago.
carrot-foundation/middle-earth/CLAUDE.mdRawGitHub
1# CLAUDE.md
2 
3Claude adapter for Middle Earth AI instructions. This file is generated from canonical `.ai/`.
4 
5## Equality rule
6 
7- Cursor, Claude, and Codex are configured as equals.
8- Capability parity is mandatory across all three.
9- Canonical source remains tool-agnostic in `.ai/`.
10 
11## Claude runtime
12 
13- Baseline settings: `.claude/settings.json`
14- Skills: `.claude/skills/*/SKILL.md`
15- Agents: `.claude/agents/*.md`
16 
17## Required workflow
18 
191. Update canonical docs under `.ai/`.
202. Run `pnpm ai:sync`.
213. Run `pnpm ai:check`.
22 
23## Canonical references
24 
25- `.ai/README.md`
26- `.ai/DEFINITIONS.md`
27- `.ai/STANDARDS.md`
28- `.ai/PARITY_MATRIX.md`
29- `.ai/PROJECT_CONTEXT.md`
30 
31## Capability counts
32 
33- Rules: 11
34- Skills: 8
35- Agents/Roles: 2
36 
37# Middle Earth Project Context
38 
39Project-specific knowledge for AI assistants working on Middle Earth. This content is appended to the generated CLAUDE.md adapter.
40 
41## Project Overview
42 
43Middle Earth is a monorepo for Carrot Foundation's publishable libraries. It contains shared packages consumed by other Carrot repos. There are no applications — only publishable libraries.
44 
45- **@carrot-foundation/eslint-config-carrot** — Shared ESLint configuration
46- **@carrot-foundation/web-logger** — Pino-based logger utility for web applications
47- **@carrot-foundation/web-ui** — React UI component library (MUI-based, atomic design)
48 
49## Technology Stack
50 
51- **Monorepo**: Nx 21.6.3 workspace with pnpm 10.2.0
52- **Node**: 22.20.0 (see `.nvmrc`)
53- **Language**: TypeScript 5.3.3 (strict mode, verbatimModuleSyntax)
54- **Frontend**: React 19, Next.js 15.5.4, MUI 7.x
55- **Logging**: Pino 10.x
56- **Build**: SWC (swc/cli, swc/core)
57- **Testing**: Jest 29.4.1 with @nx/jest
58- **Linting**: ESLint 8.56.0 (Airbnb, SonarJS, Unicorn, Security, Perfectionist, Prettier)
59- **Release**: Semantic Release 22.0.12 with independent versioning
60- **Git Hooks**: Husky 9.x with lint-staged
61- **Commit Linting**: Commitlint with cz-git
62 
63## Architecture
64 
65### Directory Structure
66 
67```
68libs/publishable/
69 eslint-config-carrot/ # @carrot-foundation/eslint-config-carrot
70 web/
71 logger/ # @carrot-foundation/web-logger
72 ui/ # @carrot-foundation/web-ui
73 src/lib/
74 atoms/ # Basic components (Button, Icons)
75 molecules/ # Composed components (Share)
76 theme/ # Theme configuration and providers
77```
78 
79### Path Aliases
80 
81Defined in `tsconfig.base.json`:
82 
83- `@middle-earth/libs/publishable/eslint-config-carrot`
84- `@middle-earth/libs/publishable/web/logger`
85- `@middle-earth/libs/publishable/web/ui`
86 
87### UI Library (web-ui)
88 
89- Follows **atomic design**: atoms, molecules, theme
90- Built on **MUI 7.x** with custom theme
91- Uses **React 19** features
92 
93### Key Constraints
94 
95- **Libraries only**: No application code — all libraries in `libs/publishable/`
96- **Publishable**: All libraries are published to npm under `@carrot-foundation/`
97- **Independent versioning**: Each library versioned separately via semantic-release
98- **Path aliases required**: Use `@middle-earth/libs/publishable/*`, NOT relative `../../..`
99 
100## Common Commands
101 
102### Development
103 
104```bash
105# Build a library
106pnpm nx build <project-name>
107 
108# Run tests
109pnpm nx test <project-name>
110 
111# Run linting
112pnpm nx lint <project-name>
113```
114 
115### Affected Commands
116 
117```bash
118# Lint affected projects
119pnpm lint:affected # nx affected --target lint --fix
120 
121# Test affected projects (not available — use nx directly)
122pnpm nx affected --target test
123 
124# Build affected projects (not available — use nx directly)
125pnpm nx affected --target build
126```
127 
128### Utilities
129 
130```bash
131# Commitizen (guided commit message)
132pnpm commit # czg
133 
134# Validate package.json files
135pnpm pkgJsonLint # npmPkgJsonLint .
136 
137# Spell check
138pnpm spellcheck # cspell (if configured)
139```
140 
141## Code Standards
142 
143**Baseline standards**: see `.ai/rules/` for all rules.
144 
145### TypeScript
146 
147- **Strict mode**: `strict: true`, `verbatimModuleSyntax`, `noUnusedLocals`, `noUnusedParameters`
148- **Imports**: Use path aliases (`@middle-earth/libs/publishable/*`), NOT relative `../../..`
149- **No `any`**: Favor precise types and narrowing
150- **Return types**: Explicit for exported functions and public APIs
151- **File organization**: `*.constants.ts`, `*.helpers.ts`, `*.types.ts`
152 
153### Testing
154 
155- **Jest** as test runner (NOT Vitest)
156- **Unit tests**: `*.spec.ts(x)` in `__tests__/` folders
157- **Mocking**: `jest.mock` for modules, `jest.spyOn` for side effects
158- **Table-driven tests**: `it.each` for input/output matrices
159- **Coverage**: Aim for 100% where feasible
160 
161## Commit Message Guidelines
162 
163### Quick Reference
164 
165- **Format**: `<type>(optional scope): <description>`
166- **Types**: `feat`, `fix`, `refactor`, `docs`, `test`, `style`, `perf`, `build`, `ci`, `chore`, `revert`
167- **Imperative mood**: "add", "fix", "update" (NOT "added", "fixed", "updated")
168- **Lowercase**: Description starts with lowercase letter
169- **No period**: Description does NOT end with a period
170 
171### Middle Earth Scopes
172 
173- **`config`**: Root-level configuration files (nx.json, tsconfig.base.json, ESLint, commitlint)
174- **`lib`**: Libraries in `libs/publishable/`
175- **`release`**: Versioning, releases, publishing
176- **`ai`**: AI instructions and rules
177 
178### Examples
179 
180```
181feat(lib): add Button component to UI library
182chore(config): update ESLint rules for TypeScript files
183chore(release): bump eslint-config-carrot to 0.9.0
184refactor(lib): simplify logger initialization
185```
186 
187## Nx Configuration
188 
189- **Plugins**: @nx/eslint/plugin, @nx/jest/plugin
190- **Default Base**: main branch
191- **Build**: `@nx/js:swc` compiler
192- **Targets per library**: build, lint, test, types, package, publish, release
193- **Project Tags**: `type:lib`
194 
195## Important Notes
196 
197- **Package Manager**: pnpm ONLY (enforced by `preinstall` script)
198- **Node Version**: 22.20.0 (check `.nvmrc`)
199- **Husky Hooks**: Git hooks for pre-commit linting via lint-staged
200- **Renovate**: Dependency updates automated with config in `renovate.json`
201- **No Docker**: Libraries only — no container builds
202- **No Infrastructure**: No Terraform, no AWS resources
203 
204## Troubleshooting
205 
206### Clear Caches
207 
208```bash
209pnpm nx reset
210```
211 
212### Dependency Issues
213 
214```bash
215rm -rf node_modules pnpm-lock.yaml
216pnpm install
217```
218 

Commands it names

  • eslint-config-carrot/
  • pnpm nx build <project-name>
  • pnpm nx test <project-name>
  • pnpm nx lint <project-name>
  • pnpm lint:affected
  • pnpm nx affected --target test
  • pnpm nx affected --target build
  • pnpm commit
  • pnpm pkgJsonLint
  • pnpm spellcheck
  • pnpm nx reset
  • pnpm install
  • pnpm ai:sync
  • pnpm ai:check
  • jest.mock
  • jest.spyOn

Sections

  • CLAUDE.md
  • Equality rule
  • Claude runtime
  • Required workflow
  • Canonical references
  • Capability counts
  • Middle Earth Project Context
  • Project Overview
  • Technology Stack
  • Architecture
  • Directory Structure
  • Path Aliases
  • UI Library (web-ui)
  • Key Constraints
  • Common Commands
  • Development
  • Build a library
  • Run tests
  • Run linting
  • Affected Commands
  • Lint affected projects
  • Test affected projects (not available — use nx directly)
  • Build affected projects (not available — use nx directly)
  • Utilities
  • Commitizen (guided commit message)
  • Validate package.json files
  • Spell check
  • Code Standards
  • TypeScript
  • Testing
  • Commit Message Guidelines
  • Quick Reference
  • Middle Earth Scopes
  • Examples
  • Nx Configuration
  • Important Notes
  • Troubleshooting
  • Clear Caches
  • Dependency Issues

What it covers

setupbuildtestlint-formatarchitecturetypestesting-strategygit-pruiagent-behaviour

Stack — with the evidence

typescript

(1.00)

node

(1.00)

nx

(1.00)

monorepo

(1.00)

jest

(1.00)

eslint

(1.00)

pnpm

(0.85)

react

(0.70)

nextjs

(0.70)

vitest

(0.70)

aws

(0.70)

javascript

(0.60)

terraform

(0.60)

github-actions

(0.60)

Format

CLAUDE.md

Claude Code's memory file. Shaped like AGENTS.md but with two things it lacks: @path imports, so shared rules live in one place, and a user-scope layer that follows the developer across repos rather than shipping with the code.

What the corpus says about it

Repository

Owner
carrot-foundation
Language
—
License
—
Archived
no

All configs in this repo

Also in carrot-foundation/middle-earth

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
carrot-foundation/middle-earth.cursor/rules/bmad.mdc · 0Cursor rulestypescriptnode+12gitdo-not51/1003 days ago
carrot-foundation/middle-earth.cursor/rules/branch-naming.mdc · 0Cursor rulestypescriptnode+12lint-formatstylegitdo-not45/1003 days ago
carrot-foundation/middle-earth.cursor/rules/code-comments.mdc · 0Cursor rulestypescriptnode+12styletypesdocs48/1003 days ago
carrot-foundation/middle-earth.cursor/rules/code-preservation.mdc · 0Cursor rulestypescriptnode+12do-not32/1003 days ago
carrot-foundation/middle-earth.cursor/rules/code-style.mdc · 0Cursor rulestypescriptnode+12lint-formatstylearchdependencies+156/1003 days ago
carrot-foundation/middle-earth.cursor/rules/commit.mdc · 0Cursor rulestypescriptnode+12testlint-formattypesgit58/1003 days ago
carrot-foundation/middle-earth.cursor/rules/documentation.mdc · 0Cursor rulestypescriptnode+12lint-formatstylearchdocs42/1003 days ago
carrot-foundation/middle-earth.cursor/rules/pull-request-description.mdc · 0Cursor rulestypescriptnode+12git39/1003 days ago
carrot-foundation/middle-earth.cursor/rules/pull-request.mdc · 0Cursor rulestypescriptnode+12lint-formatgitagent-behaviour69/1003 days ago
carrot-foundation/middle-earth.cursor/rules/testing.mdc · 0Cursor rulestypescriptnode+12teststyletesting-strategy73/1003 days ago
carrot-foundation/middle-earth.cursor/rules/typescript.mdc · 0Cursor rulestypescriptnode+12buildlint-formatstylearch+159/1003 days ago
carrot-foundation/middle-earthAGENTS.md · 0AGENTS.mdtypescriptnode+12setupbuildtestlint-format+797/1003 days ago
Diff against .cursor/rules/bmad.mdc Diff against .cursor/rules/branch-naming.mdc Diff against .cursor/rules/code-comments.mdc Diff against .cursor/rules/code-preservation.mdc Diff against .cursor/rules/code-style.mdc Diff against .cursor/rules/commit.mdc Diff against .cursor/rules/documentation.mdc Diff against .cursor/rules/pull-request-description.mdc Diff against .cursor/rules/pull-request.mdc Diff against .cursor/rules/testing.mdc Diff against .cursor/rules/typescript.mdc Diff against AGENTS.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
Adit-Jain-srm/NightmareNetCLAUDE.md · 45CLAUDE.mdtypescriptpython+18buildtestlint-formatstyle+6100/1003 days ago
bagisto/bagistoCLAUDE.md · 28kCLAUDE.mdphplaravel+8setupbuildteststyle+5100/1003 days ago
microsoft/playwrightCLAUDE.md · 94kCLAUDE.mdtypescriptjavascript+10buildtestlint-formatstyle+7100/1003 days ago
dotCMS/corecore-web/CLAUDE.md · 949CLAUDE.mdjavanode+13teststylearchtesting-strategy+3100/1003 days ago
nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.4kCLAUDE.mdtypescriptnode+16setupbuildstylearch+2100/1003 days ago
filamentphp/filamentCLAUDE.md · 32kCLAUDE.mdphplaravel+5buildtestlint-formatstyle+7100/1003 days ago
dotCMS/coreCLAUDE.md · 949CLAUDE.mdjavanode+9setupbuildteststyle+799/100today
lollipopkit/flutter_server_boxCLAUDE.md · 8.3kCLAUDE.mddartflutter+8buildteststylearch+298/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack