agentleFS
altair-graphqlaltair-graphql/altair/AGENTS.md

altair

AGENTS.md5.4k starsChanged 3 years agoMITView on GitHub

Altair GraphQL Client is a monorepo managed with pnpm and Nx/Turbo. Key packages: Note: Always run from the packages/altair-app directory. The test suite has 135 suites / ~1133 tests and takes ~3–4 minutes. Group imports in this order: 1. External libraries (rxjs, @angular/) 2. Internal packages (@altairgraphql/) 3. Relative imports (../, ./) Each test should be independent. Avoid tracking emission indices across tests.

  • Installs packages

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

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use OnPush change detection strategy

    line 53
  2. Very specific:

    Use signal inputs (input<T>()) and signal outputs (output<T>())

    line 54
  3. Distinctive:

    Use selectors for NgRx state access

    line 60
  4. Very specific:

    "no elements in sequence": Use take(1) instead of first()

    line 104
  5. Very specific:

    Multiple actions, only one works: Use mergeMap instead of switchMap in NgRx effects

    line 105

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 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 - Altair GraphQL Client

Repository Overview

Altair GraphQL Client is a monorepo managed with pnpm and Nx/Turbo. Key packages:

  • packages/altair-app - Angular-based frontend application
  • packages/altair-api - NestJS backend API
  • packages/altair-core - Shared business logic and types
  • packages/altair-electron - Electron desktop wrapper
  • packages/altair-crx - Browser extension

Build Commands

Root Level (monorepo)

pnpm install              # Install all dependencies
pnpm bootstrap            # Build local packages and link them
pnpm build                # Build all packages
pnpm test                 # Run tests across monorepo
pnpm start:app            # Start web app (localhost:4200)
pnpm start:api:dev        # Start API dev server
pnpm build-ext            # Build browser extension
pnpm build-electron       # Build Electron app

Altair App (packages/altair-app)

pnpm vitest run                            # Run all Vitest tests
pnpm vitest                                # Watch mode
pnpm vitest run path/to/file.spec.ts       # Run single test file
pnpm vitest run -t "name"                  # Run tests matching name
pnpm test-single-run                       # Single run with coverage
pnpm lint                                  # Run ESLint (ng lint)
pnpm build                                 # Build the app

Note: Always run from the packages/altair-app directory. The test suite has 135 suites / ~1133 tests and takes ~3–4 minutes.

Code Style

Imports

Group imports in this order:

  1. External libraries (rxjs, @angular/*)
  2. Internal packages (@altairgraphql/*)
  3. Relative imports (../, ./)

Angular Components

  • Use OnPush change detection strategy
  • Use signal inputs (input<T>()) and signal outputs (output<T>())
  • Manage subscriptions (unsubscribe in ngOnDestroy)

Angular Services

  • Return observables from data methods
  • Use selectors for NgRx state access
  • Dispatch actions for state modifications

Testing Guidelines

What to Test

  • Component business logic and methods
  • Event emissions using wrapper.emitted()
  • State management and property changes
  • Edge cases (null values, rapid calls, invalid inputs)

What NOT to Test

  • UI library component props (ng-zorro, Angular Material)
  • Template rendering details or CSS styling

Test Pattern (altair-app)

import { mount } from '../testing';
import { ExampleComponent } from './example.component';

describe('ExampleComponent', () => {
  let wrapper: ReturnType<typeof mount>;

  beforeEach(() => {
    wrapper = mount(ExampleComponent, {
      props: { initialValue: 'test' },
      providers: [{ provide: SomeService, useValue: mockSomeService }]
    });
  });

  it('should emit event when button is clicked', () => {
    wrapper.componentInstance.onButtonClick();
    expect(wrapper.emitted().buttonClicked[0]).toEqual(['test-data']);
  });
});

Test Independence

Each test should be independent. Avoid tracking emission indices across tests.

Common Issues

  • "no elements in sequence": Use take(1) instead of first()
  • Multiple actions, only one works: Use mergeMap instead of switchMap in NgRx effects
  • Tests failing: Try deleting the node_modules/.vite cache directory

Additional Resources

  • Development setup: .github/development.md
  • Angular components: .github/instructions/angular-components.instructions.md
  • Angular services: .github/instructions/angular-services.instructions.md
  • Angular app testing: .github/instructions/app-testing.instructions.md
  • General testing: .github/instructions/testing.instructions.md
  • TypeScript: .github/instructions/typescript.instructions.md
  • NestJS API: .github/instructions/nestjs-api.instructions.md
  • JavaScript: .github/instructions/javascript.instructions.md
  • Documentation: .github/instructions/documentation.instructions.md

Download now (ZIP)

Trending

Less talk lately.about the whole repository

Dec 2025: 2 mentionsJan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 2 mentionsApr 2026: 4 mentionsMay 2026: 4 mentionsJun 2026: 2 mentionsJul 2026: 1 mentionAug 2026: 1 mentionSep 2026: 1 mentionOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the altair-graphql/altair repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about altair-graphql/altair

The biggest 5 of 50 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 50

Talked about on GitHub (50 times).

On GitHub · 50

45 more on GitHub
  • 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 28,693 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.

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.