agentleFS
relsunkaevrelsunkaev/effect-qb/AGENTS.md

effect-qb

AGENTS.md208 starsChanged 8 months agoMITView on GitHub

Use Bun instead of Node.js, npm, pnpm, or vite.

  • Reads credentials
  • Commits and pushes
  • 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 31,774 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

Show its rules and text

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

29 rules. About 0 are common, 10 are distinctive, and 19 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 19

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Default to using Bun instead of Node.js.

    line 7
  2. Very specific:

    Use bun <file> instead of node <file> or ts-node <file>

    line 9
  3. Very specific:

    Use bun install instead of npm install or yarn install or pnpm install

    line 12
  4. Very specific:

    Use bunx tsgo instead of tsc

    line 20
  5. Very specific:

    Use bunx tsgo -p <tsconfig> for project typechecks

    line 21
  6. Very specific:

    Prefer existing repo scripts that already invoke tsgo

    line 22
  7. Very specific:

    Do not introduce new tsc-based scripts or documentation unless there is a specific, documented reason

    line 23
  8. Distinctive:

    Use README contents that follow the document's heading hierarchy and wording.

    line 40
  9. Very specific:

    Prefer Bun.file over node:fs's readFile/writeFile

    line 53
  10. Very specific:

    Use bun test to run tests.

    line 58
  11. Very specific:

    Use HTML imports with Bun.serve().

    line 70
  12. Very specific:

    Do not prefix branch names with codex/.

    line 145
  13. Very specific:

    Keep both packages on the 0.x version line until the user explicitly requests a 1.0 release.

    line 149
  14. Very specific:

    Prefer a single Effect.gen for multi-step sequential workflows over successive Effect.andThen applications.

    line 154
  15. Distinctive:

    Keep Bun as the workspace package manager and tooling runtime.

    line 158
  16. Very specific:

    Keep published effect-qb and effect-db runtime behavior Node.js-native.

    line 159
  17. Very specific:

    Prefer Effect Platform services for filesystem, path, terminal, process, and other host capabilities.

    line 160
  18. Very specific:

    Keep property-path JSON navigation such as jsonColumn.someArray[2].someField.

    line 168
  19. Distinctive:

    Use PostgreSQL 16.x and MySQL 8.4.x as the initial coercion support baseline.

    line 178
  20. Distinctive:

    Prefer pipeable Effect transforms for result cardinality instead of adding convenience methods to executors.

    line 182
  21. Distinctive:

    Keep pagination ordering, seek predicates, limits, and cursor policy explicit and composable.

    line 188
  22. Very specific:

    Use bd for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists

    line 208
  23. Very specific:

    Run bd prime for detailed command reference and session close protocol

    line 209
  24. Very specific:

    Use bd remember for persistent knowledge — do NOT use MEMORY.md files

    line 210
  25. Distinctive:

    File issues for remaining work: - Create issues for anything that needs follow-up

    line 218
  26. Distinctive:

    Verify: - All changes committed AND pushed

    line 229
  27. Distinctive:

    NEVER stop before pushing - that leaves work stranded locally

    line 234
  28. Distinctive:

    NEVER say "ready to push when you are" - YOU must push

    line 235
  29. Distinctive:

    If push fails, resolve and retry until it succeeds <!-- END BEADS INTEGRATION -->

    line 236

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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

Default to using Bun instead of Node.js.

  • Use bun <file> instead of node <file> or ts-node <file>
  • Use bun test instead of jest or vitest
  • Use bun build <file.html|file.ts|file.css> instead of webpack or esbuild
  • Use bun install instead of npm install or yarn install or pnpm install
  • Use bun run <script> instead of npm run <script> or yarn run <script> or pnpm run <script>
  • Bun automatically loads .env, so don't use dotenv.

TypeScript

This project should use tsgo for TypeScript compilation and typechecking.

  • Use bunx tsgo instead of tsc
  • Use bunx tsgo -p <tsconfig> for project typechecks
  • Prefer existing repo scripts that already invoke tsgo
  • Do not introduce new tsc-based scripts or documentation unless there is a specific, documented reason
  • Assess readability through the human reading path: visual hierarchy, navigation, skimmability, and flow. Flattening composition alone is not a readability review.
  • Include the file tree in visual readability reviews: filenames, folder grouping, depth, and discoverability of public APIs and implementation owners. Navigation notes supplement coherent structure rather than compensate for it.
  • Validate readability with concrete discovery tasks given to an unbriefed reader. Record navigation, wrong turns, and verified versus inferred connections. Calmer files, moved types, and shorter files alone do not demonstrate reduced complexity; distinguish current discoverability from measured improvement.
  • For Zed screenshot evaluations, read code and navigation results through the UI, not terminal searches or extracted editor text. Run fresh readers sequentially from matching editor states, exclude prior investigation notes from discovery, and distinguish verified call paths from search snippets and inference.
  • Review README usability in GitHub's rendered view, including section navigation, explanation flow, and feature coverage. Check examples against public APIs.
  • Use README contents that follow the document's heading hierarchy and wording.
  • Lead README table definitions with portable inline column modifiers, then explain table-level composite constraints.
  • Prioritize README scenarios, outcomes, and execution boundaries. Narrow-width wrapping is not a goal unless explicitly requested.

APIs

  • Bun.serve() supports WebSockets, HTTPS, and routes. Don't use express.
  • bun:sqlite for SQLite. Don't use better-sqlite3.
  • Bun.redis for Redis. Don't use ioredis.
  • Bun.sql for Postgres. Don't use pg or postgres.js.
  • WebSocket is built-in. Don't use ws.
  • Prefer Bun.file over node:fs's readFile/writeFile
  • Bun.$ls instead of execa.

Testing

Use bun test to run tests.

import { test, expect } from "bun:test";

test("hello world", () => {
  expect(1).toBe(1);
});

Frontend

Use HTML imports with Bun.serve(). Don't use vite. HTML imports fully support React, CSS, Tailwind.

Server:

import index from "./index.html"

Bun.serve({
  routes: {
    "/": index,
    "/api/users/:id": {
      GET: (req) => {
        return new Response(JSON.stringify({ id: req.params.id }));
      },
    },
  },
  // optional websocket support
  websocket: {
    open: (ws) => {
      ws.send("Hello, world!");
    },
    message: (ws, message) => {
      ws.send(message);
    },
    close: (ws) => {
      // handle close
    }
  },
  development: {
    hmr: true,
    console: true,
  }
})

HTML files can import .tsx, .jsx or .js files directly and Bun's bundler will transpile & bundle automatically. <link> tags can point to stylesheets and Bun's CSS bundler will bundle.

<html>
  <body>
    <h1>Hello, world!</h1>
    <script type="module" src="./frontend.tsx"></script>
  </body>
</html>

With the following frontend.tsx:

import React from "react";

// import .css files directly and it works
import './index.css';

import { createRoot } from "react-dom/client";

const root = createRoot(document.body);

export default function Frontend() {
  return <h1>Hello, world!</h1>;
}

root.render(<Frontend />);

Then, run index.ts

bun --hot ./index.ts

For more information, read the Bun API docs in node_modules/bun-types/docs/**.md.

Git

  • Do not prefix branch names with codex/.

Releases

  • Keep both packages on the 0.x version line until the user explicitly requests a 1.0 release. A stable Effect dependency does not change this policy.

Runtime and build boundaries

  • Prefer a single Effect.gen for multi-step sequential workflows over successive Effect.andThen applications. Use flat pipes for query composition and Effect transforms; keep workflow sequencing visible in one place.
  • Keep Bun as the workspace package manager and tooling runtime.
  • Keep published effect-qb and effect-db runtime behavior Node.js-native.
  • Prefer Effect Platform services for filesystem, path, terminal, process, and other host capabilities. Keep Node-specific implementations at the runtime assembly boundary with NodeServices and NodeRuntime.
  • Assume consumer code is bundled or built with esbuild. Do not add a runtime TypeScript loader solely to support unbuilt TypeScript syntax.

Querybuilder public API boundaries

  • Keep property-path JSON navigation such as jsonColumn.someArray[2].someField. Reusable focuses and pipeable mutations supplement that API.
  • JSON paths and mutations use stored encoded shapes and return stored values. Whole-column selection retains schema decoding.
  • JSON transport is explicit: default PostgreSQL/MySQL clients return decoded JSON; SQLite JSON-valued paths return serialized JSON and decode once. Custom driver representations use value-mapping overrides, not content guessing.
  • Expose native division only through dialect function modules. Keep numeric cast witnesses unqualified engine casts; portable precision/scale is not a contract. Column DDL precision remains separate.
  • Use PostgreSQL 16.x and MySQL 8.4.x as the initial coercion support baseline; verify SQLite per supported driver. Reject unsupported modeled built-in cast pairs; custom metadata remains a caller assertion.
  • Prefer pipeable Effect transforms for result cardinality instead of adding convenience methods to executors. Keep result metadata on executors because the driver owns that contract.
  • Standard query and function exports must have supported syntax and compatible runtime semantics across PostgreSQL, MySQL, and SQLite. Otherwise expose the capability only from the applicable dialect module.
  • Keep pagination ordering, seek predicates, limits, and cursor policy explicit and composable. Do not add a compound keyset modifier without a reviewed pagination contract.
<!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:ca08a54f -->

Beads Issue Tracker

This project uses bd (beads) for issue tracking. Run bd prime to see full workflow context and commands.

Quick Reference

bd ready              # Find available work
bd show <id>          # View issue details
bd update <id> --claim  # Claim work
bd close <id>         # Complete work

Rules

  • Use bd for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists
  • Run bd prime for detailed command reference and session close protocol
  • Use bd remember for persistent knowledge — do NOT use MEMORY.md files

Session Completion

When ending a work session, you MUST complete ALL steps below. Work is NOT complete until git push succeeds.

MANDATORY WORKFLOW:

  1. File issues for remaining work - Create issues for anything that needs follow-up
  2. Run quality gates (if code changed) - Tests, linters, builds
  3. Update issue status - Close finished work, update in-progress items
  4. PUSH TO REMOTE - This is MANDATORY:
    git pull --rebase
    bd dolt push
    git push
    git status  # MUST show "up to date with origin"
  5. Clean up - Clear stashes, prune remote branches
  6. Verify - All changes committed AND pushed
  7. Hand off - Provide context for next session

CRITICAL RULES:

  • Work is NOT complete until git push succeeds
  • NEVER stop before pushing - that leaves work stranded locally
  • NEVER say "ready to push when you are" - YOU must push
  • If push fails, resolve and retry until it succeeds
<!-- END BEADS INTEGRATION -->

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.