agentleFS
SentryKnown publishergetsentry/sqlish/AGENTS.md

sqlish

AGENTS.md0 starsChanged 8 months agoApache-2.0View on GitHub

- sqlish grammar import uses generated JS file: \SQLishParser.ts\ imports from \./sqlish-grammar.js\ which is generated by \scripts/compile-grammar.mjs\ during \prebuild\. A corresponding \src/sqlish-grammar.d.ts\ provides types. The generated file is gitignored, so you must run \pnpm run prebuild\ (or \pnpm run build\ which triggers it) before TypeScript compilation or IDE type-checking will work. <!-- End lore-managed section -->

The file

Files
AGENTS.md
<!-- This section is maintained by the coding agent via lore (https://github.com/BYK/opencode-lore) -->

Long-term Knowledge

Architecture

<!-- lore:019d1c89-c211-7d1f-85a5-e1a01ac6d60c -->
  • sqlish package structure and build pipeline: Package `@sentry/sqlish` is a SQL-ish parser/formatter with two entry points: `src/index.ts` (core) and `src/react.tsx` (React formatter). Built with tsup (ESM, declarations, sourcemaps). PEG grammar is pre-compiled to `src/sqlish-grammar.js` via `scripts/compile-grammar.mjs` (peggy CLI) in the `prebuild` step — this file is gitignored. Zero runtime deps; React is an optional peer dep (>=17). Uses pnpm as package manager, vitest for tests, and Craft for releases via `.craft.yml` (npm public + github targets).

Decision

<!-- lore:019d1c89-c21a-7648-ac34-20b6d44dddee -->
  • Removed Sentry instrumentation from sqlish library code: All `@sentry/react` instrumentation (spans, captureException) was removed from `SQLishFormatter` when making the package publishable. The library is a dependency consumed by other Sentry projects — it should not depend on or call Sentry SDK directly. The formatter was also converted from `.tsx` to `.ts` since React rendering was moved to the separate `/react` subpath export.

Pattern

<!-- lore:019d1c89-c216-74c4-bd17-054ac33ef099 -->
  • sqlish grammar import uses generated JS file: `SQLishParser.ts` imports from `./sqlish-grammar.js` which is generated by `scripts/compile-grammar.mjs` during `prebuild`. A corresponding `src/sqlish-grammar.d.ts` provides types. The generated file is gitignored, so you must run `pnpm run prebuild` (or `pnpm run build` which triggers it) before TypeScript compilation or IDE type-checking will work.
<!-- End lore-managed section -->

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.