agentleFS
benvinegarbenvinegar/termdraw/AGENTS.md

termdraw

AGENTS.md338 starsChanged 7 months agoMITView on GitHub

termDRAW is a Bun-based TypeScript workspace for terminal-native diagramming. Run the smallest relevant set first, then the broader workspace checks before finishing larger changes.

  • 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,843 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

26 rules. About 0 are common, 11 are distinctive, and 15 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 15

    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 35
  2. Very specific:

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

    line 36
  3. Very specific:

    Use bun test instead of Jest or Vitest commands.

    line 37
  4. Very specific:

    Use bun build <file.html|file.ts|file.css> instead of bundlers like webpack or esbuild.

    line 38
  5. Very specific:

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

    line 39
  6. Very specific:

    Use bun run <script> instead of npm/yarn/pnpm script runners.

    line 40
  7. Very specific:

    Use bunx <package> <command> instead of npx <package> <command>.

    line 41
  8. Distinctive:

    Prefer Bun-native APIs when adding platform code:

    line 43
  9. Very specific:

    Keep the workspace split intact: reusable editor behavior belongs in packages/opentui, the standalone CLI belongs in packages/app, and …

    line 50
  10. Distinctive:

    Prefer targeted changes over broad rewrites.

    line 51
  11. Very specific:

    When changing editor behavior, add or update tests in packages/opentui.

    line 52
  12. Distinctive:

    Run the Pi smoke flow when modifying Pi embed behavior, save messaging, or bridge wiring.

    line 53
  13. Distinctive:

    Run the smallest relevant set first, then the broader workspace checks before finishing larger changes.

    line 57
  14. Very specific:

    Keep upcoming work under ## [Unreleased] with these subsections:

    line 70
  15. Very specific:

    When cutting a release, move the relevant unreleased entries into a new immutable version section and then start a fresh ## [Unreleased] …

    line 75
  16. Distinctive:

    Use the released changelog section as the starting point for GitHub release notes.

    line 76
  17. Very specific:

    Prefer gh release create/edit --notes-file for multi-line release notes.

    line 77
  18. Distinctive:

    Do not trust autogenerated GitHub release notes blindly.

    line 78
  19. Distinctive:

    Prefer concise user-visible changelog entries over internal refactor details unless behavior changed.

    line 79
  20. Distinctive:

    Keep all publishable packages on the exact same version at release time.

    line 80
  21. Distinctive:

    When bumping versions, update every publishable package together and also update internal workspace dependency pins to the same version.

    line 81
  22. Very specific:

    Use repo-level coordinated releases: create one root Git tag and one GitHub release per shared version, in the form vX.Y.Z.

    line 83
  23. Very specific:

    Do not use package-specific release tags like app-vX.Y.Z, opentui-vX.Y.Z, or pi-vX.Y.Z for official releases.

    line 85
  24. Distinctive:

    Before publishing, verify package versions are identical across all publishable packages.

    line 86
  25. Very specific:

    Use Conventional Commit titles when practical: <type>[scope]: <description>.

    line 90
  26. Distinctive:

    Keep commits focused and easy to review.

    line 91

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

AGENTS.md

What this project is

termDRAW is a Bun-based TypeScript workspace for terminal-native diagramming.

  • packages/opentui contains the published @termdraw/opentui embeddable OpenTUI library.
  • packages/app contains the published @termdraw/app standalone CLI.
  • packages/pi contains the published @termdraw/pi Pi integration package that mounts termDRAW through opentui-island.
  • The repo root provides shared workspace scripts for formatting, linting, testing, typechecking, build checks, packaging checks, and Pi smoke coverage.

Important file entry points

  • package.json — workspace scripts and maintenance commands
  • tsconfig.json — shared TypeScript defaults for the workspace
  • packages/opentui/src/draw-state.ts — retained object model, selection, transforms, undo/redo, export
  • packages/opentui/src/app.ts — renderable chrome/editor surface and input handling
  • packages/opentui/src/react.ts — OpenTUI React component bindings
  • packages/app/src/main.tsx — standalone CLI runtime entrypoint
  • packages/app/src/cli.tsx — Bun executable wrapper for the standalone app
  • packages/pi/extensions/overlay.ts — Pi /termdraw command and editor insertion flow
  • packages/pi/islands/termdraw.island.tsx — Pi island bridge component
  • .github/workflows/* — CI and publishing automation

Architecture / mental model

  • DrawState owns the drawing document, tool state, selection state, history, and exported output.
  • TermDrawRenderable renders either the full app chrome or the bare editor surface on top of the shared state model.
  • react.ts exposes TermDrawApp, TermDrawEditor, and TermDraw as OpenTUI React components.
  • cli.tsx wraps the full app for local CLI usage.
  • The Pi package adapts the same core UI through an island bridge and returns saved art back into the Pi editor.

Working rules

  • 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 commands.
  • Use bun build <file.html|file.ts|file.css> instead of bundlers like webpack or esbuild.
  • Use bun install instead of npm, yarn, or pnpm.
  • Use bun run <script> instead of npm/yarn/pnpm script runners.
  • Use bunx <package> <command> instead of npx <package> <command>.
  • Bun already loads .env; do not add dotenv.
  • Prefer Bun-native APIs when adding platform code:
    • Bun.serve() instead of Express
    • bun:sqlite instead of better-sqlite3
    • Bun.redis instead of ioredis
    • Bun.sql instead of pg or postgres.js
    • built-in WebSocket instead of ws
    • Bun.file instead of fs.readFile/writeFile when practical
  • Keep the workspace split intact: reusable editor behavior belongs in packages/opentui, the standalone CLI belongs in packages/app, and Pi-specific integration logic belongs in packages/pi.
  • Prefer targeted changes over broad rewrites.
  • When changing editor behavior, add or update tests in packages/opentui.
  • Run the Pi smoke flow when modifying Pi embed behavior, save messaging, or bridge wiring.

Validation commands

Run the smallest relevant set first, then the broader workspace checks before finishing larger changes.

  • bun run format:check
  • bun run lint
  • bun test
  • bun run typecheck
  • bun run build
  • bun run check
  • bun run smoke:pi for Pi integration changes

Release / changelog rules

  • Maintain the top-level CHANGELOG.md as the source of truth for user-visible changes.
  • Keep upcoming work under ## [Unreleased] with these subsections:
    • ### Added
    • ### Changed
    • ### Fixed
  • Append to existing subsections instead of creating duplicates.
  • When cutting a release, move the relevant unreleased entries into a new immutable version section and then start a fresh ## [Unreleased] block.
  • Use the released changelog section as the starting point for GitHub release notes.
  • Prefer gh release create/edit --notes-file for multi-line release notes.
  • Do not trust autogenerated GitHub release notes blindly; review and edit them.
  • Prefer concise user-visible changelog entries over internal refactor details unless behavior changed.
  • Keep all publishable packages on the exact same version at release time.
  • When bumping versions, update every publishable package together and also update internal workspace dependency pins to the same version.
  • For this repo, release @termdraw/opentui, @termdraw/app, and @termdraw/pi as a coordinated set unless there is an explicit reason not to.
  • Use repo-level coordinated releases: create one root Git tag and one GitHub release per shared version, in the form vX.Y.Z.
  • Publish all three packages for every coordinated release, even if one package had no code changes in that cut.
  • Do not use package-specific release tags like app-vX.Y.Z, opentui-vX.Y.Z, or pi-vX.Y.Z for official releases.
  • Before publishing, verify package versions are identical across all publishable packages.

Commit conventions

  • Use Conventional Commit titles when practical: <type>[scope]: <description>.
  • Keep commits focused and easy to review.
  • Mention the validation commands you ran in PR descriptions or handoff notes.

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.