agentleFS
affromeroaffromero/fairtrail/AGENTS.md

fairtrail

AGENTS.md193 starsChanged 6 months agoMITView on GitHub

Guidance for AI coding agents working on Flight Finder, a self-hosted flight price tracker. This is the cross-tool entry point. See README.md for the product overview and API.md for the runtime HTTP API you can call against a running instance. - Before opening or updating a PR, read .github/PULL_REQUEST_TEMPLATE.md and fill every applicable section, including when using the GitHub CLI or API. Use the specialized template when one applies. - Every PR, including documentation and dependency updates, must link a…

  • Reads credentials
  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. affromero/flight-finder★ 193100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • 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 repositoryOne other file it gives its agents.

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Before opening or updating a PR, read .github/PULL_REQUEST_TEMPLATE.md and fill every applicable section, including when using the GitHub …

    line 10
  2. Distinctive:

    Use the specialized template when one applies.

    line 12
  3. Distinctive:

    Every PR, including documentation and dependency updates, must link a real tracking issue.

    line 13
  4. Very specific:

    Use Closes #123 only when the PR fully resolves the issue.

    line 16
  5. Distinctive:

    Keep the issue and PR consistent with the final scope and validation results.

    line 18
  6. Distinctive:

    Follow the session's authorization rules for publishing or editing them.

    line 19
  7. Distinctive:

    Keep screenshots and recordings used only as PR evidence out of the main branch.

    line 23
  8. Distinctive:

    If a PR already committed evidence files, pin its media links to a retained commit and exclude those files from the merge result.

    line 25
  9. Very specific:

    All four version points (root, apps/web, packages/cli, apps/desktop) are kept in lockstep.

    line 72
  10. Very specific:

    TypeScript strict, no any: Use early returns, at most 3 nesting levels, and keep source files at or below 1000 lines.

    line 77
  11. Very specific:

    Commits: use Conventional Commit subjects: feat:, fix:, docs:, refactor:, chore:, test:.

    line 87
  12. Very specific:

    Never use .env files and never commit secrets.

    line 92

≈ “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

Guidance for AI coding agents working on Flight Finder, a self-hosted flight price tracker. This is the cross-tool entry point. See README.md for the product overview and API.md for the runtime HTTP API you can call against a running instance.

Pull request workflow

  • Before opening or updating a PR, read .github/PULL_REQUEST_TEMPLATE.md and fill every applicable section, including when using the GitHub CLI or API. Use the specialized template when one applies.
  • Every PR, including documentation and dependency updates, must link a real tracking issue. Search and reuse an existing issue, or open one describing the problem, expected behavior, and acceptance criteria before opening the PR.
  • Use Closes #123 only when the PR fully resolves the issue. Use Related to #123 for partial work and list the remaining tasks.
  • Keep the issue and PR consistent with the final scope and validation results. Follow the session's authorization rules for publishing or editing them. An inspection-only request does not authorize creating an issue or PR.
  • Record the author's actual review-assistance preference. Do not infer consent to AI-assisted follow-up work or merging.
  • Keep screenshots and recordings used only as PR evidence out of the main branch. Use GitHub attachments or commit-pinned links to an evidence branch. If a PR already committed evidence files, pin its media links to a retained commit and exclude those files from the merge result. Verify the resulting tree before merging. Keep media used by product documentation or shipped with the app.

Stack

TypeScript (strict) monorepo on Node >= 22, npm workspaces. Next.js 16 (App Router, React 19) web app, Prisma 7 over PostgreSQL 16, Redis 7 for caching and rate limiting, Playwright for scraping, Vitest for tests. The caller supplies secrets through the environment, never committed files.

Setup

npm install
docker compose up -d db redis      # or: make setup
npm run db:push                    # apply the Prisma schema
npm run db:generate                # generate the Prisma client
npm run dev                        # Next.js web app on http://localhost:3003

make dev wraps the database, Redis, and dev-server steps.

Checks (run before every commit and PR)

npm run ci         # lint + typecheck + test + build (web) + build (cli)
# or individually:
npm run lint       # ESLint, both workspaces, --max-warnings 0
npm run typecheck  # tsc strict, both workspaces
npm run test       # Vitest, both workspaces

npm run ci must pass before you push; GitHub Actions runs the same gate. Linting is zero-warnings and typecheck is strict (noUncheckedIndexedAccess).

Monorepo layout

  • apps/web: the Next.js app and API backend (@flight-finder/web). Prisma schema at apps/web/prisma/schema.prisma; core logic under apps/web/src/lib/ (auth, prisma, redis, notifications, scraper).
  • packages/cli: the Ink/React terminal UI (@flight-finder/cli). It reuses the scraper from apps/web via relative imports.
  • apps/desktop: the Tauri (Rust) launcher. It is not an npm workspace and is built and versioned on its own.

All four version points (root, apps/web, packages/cli, apps/desktop) are kept in lockstep; the /create-release flow bumps them together.

Conventions

  • TypeScript strict, no any. Use early returns, at most 3 nesting levels, and keep source files at or below 1000 lines. New source files must use a focused subdirectory when the current directory already contains 10 source files; the pre-commit hooks enforce both limits.
  • Styling is CSS Modules only (Component.tsx + Component.module.css). No Tailwind, no inline styles. Server Components by default; add 'use client' only when needed.
  • API routes validate input, return proper HTTP status codes, and respond via the apiSuccess() / apiError() helpers.
  • Tests target behavior, not implementation details (Vitest).
  • Commits use Conventional Commit subjects: feat:, fix:, docs:, refactor:, chore:, test:.

Secrets

Never use .env files and never commit secrets. Shared scripts must accept the caller's environment without hardcoded secret-manager accounts or wrappers. Provider API keys (Anthropic, OpenAI, Gemini, local) resolve through resolveApiKey() in apps/web/src/lib/scraper/ai-registry.ts, where DB-stored encrypted keys take precedence over env vars. Do not read process.env.<PROVIDER>_API_KEY directly; go through the registry.

CLI shim gotcha

packages/cli maps @/* to packages/cli/src/ and reuses the scraper from apps/web via relative imports. Any new @/lib/<x> import added to a shared scraper file needs a matching shim in packages/cli/src/lib/ (re-export the real module or provide a stub). Web-only tests pass without it; the full npm run ci (web + cli) is what catches a missing shim.

Releasing

Releases are tag driven and version-locked across all four packages. Run the pre-release gate first (the docker-smoke, install-flow, cli-runtime, and migration scripts under scripts/), then use the /create-release flow, which bumps every version point and regenerates the lockfiles. Web tags are vX.Y.Z; desktop tags are desktop-vX.Y.Z.

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.