This document provides guidelines for AI coding assistants when writing, reviewing, or modifying code in the ax-score project. All comments, commit messages, and documentation must be written in English.
ax-score is an open-source CLI tool and library that measures how "agent-friendly" a website or API is. Like Google Lighthouse for web performance, ax-score scores sites on their readiness for AI agent consumption.
- Domain:
ax-score.org(planned) - License: MIT
- Language: English (all documentation, commits, PRs, and code)
| Technology | Version | Purpose |
|---|---|---|
| TypeScript | 5.9 | Type Safety |
| Node.js | 20+ | Runtime Environment |
| tsup | latest | Bundler |
| vitest | latest | Testing Framework |
| commander | latest | CLI Framework |
| chalk | latest | Terminal Styling |
| ora | latest | Terminal Spinners |
| pnpm | 10+ | Package Manager |
ax-score/
├── src/
│ ├── gatherers/ # Data collection logic (HTTP, Puppeteer, etc.)
│ ├── audits/ # Scoring logic based on gathered data
│ ├── config/ # Audit configurations and weights
│ ├── reporter/ # Output formatting (CLI, JSON, HTML)
│ ├── bin/ # CLI entry point
│ ├── lib/ # Shared utilities
│ └── types/ # TypeScript type definitions
├── tests/ # Test suites
├── docs/ # Project documentation
└── dist/ # Compiled output
ax-score follows a 3-phase pipeline:
- Gather: Collect raw data from the target URL (e.g., fetching
llms.txt, checking headers, parsing HTML). - Audit: Run specific tests against the gathered data to produce scores and diagnostic information.
- Report: Aggregate audit results into categories and format the output for the user.
strict: trueis requiredanyis forbidden → useunknownas any,@ts-ignore,@ts-expect-errorare strictly forbiddeninterface→ Public API,type→ Internal use- Omit types if they can be inferred
| Target | Rule | Example |
|---|---|---|
| File | kebab-case | base-gatherer.ts |
| Variable/Function | camelCase | runAudit(), data |
| Constant | UPPER_SNAKE_CASE | MAX_RETRIES |
| Type/Interface | PascalCase | AuditResult, Config |
ax-score uses Git Flow with two long-lived branches:
| Branch | Purpose | Merges From | Merges To |
|---|---|---|---|
main |
Production | develop (release), hotfix/* |
— |
develop |
Integration | feat/*, fix/*, refactor/*, etc. |
main |
Key Rules:
- Feature branches are created from
develop - Feature PRs target
develop - Branch name format:
<type>/<description>-#<issue_number>
<type>: <subject> (#<issue_number>)
<body>
Types: feat, fix, docs, refactor, test, chore, rename, remove.
Before pushing, run these checks:
pnpm type-check # TypeScript errors = MUST fix
pnpm lint # Lint errors = MUST fix
pnpm build # Build failure = MUST fix
pnpm test # Test failure = MUST fixas any,@ts-ignore,@ts-expect-error— Strictly forbidden- Empty catch blocks
catch(e) {}— Error handling is required - Committing
console.logdebugging code — Forbidden
# Build the project
pnpm build
# Development mode (watch)
pnpm dev
# Run tests
pnpm test
# Lint code
pnpm lint
# Type check
pnpm type-check