agentleFS
clideyclidey/whodb/AGENTS.md

whodb

AGENTS.md5k starsChanged 2 months agoApache-2.0View on GitHub

WhoDB is a source-first data management tool. The public GraphQL API and frontend contract are built around SourceType, SourceContract, SourceObject, SourceObjectRef, and SourceSessionMetadata. The current execution layer is still powered mainly by database plugins under core/src/plugins/. AGENTS.md is the canonical agent instruction file for this repository. Tool- specific files such as CLAUDE.md should import or point to this file instead of duplicating these instructions. If the ee/ directory is present, read ee/AGENTS.md for additional context. Do not add any code,…

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 1 mentionFeb 2026: 4 mentionsMar 2026: 8 mentionsApr 2026: 4 mentionsMay 2026: 5 mentionsJun 2026: 7 mentionsJul 2026: 6 mentionsAug 2026: 6 mentionsSep 2026: 6 mentionsOct 2026: 2 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the clidey/whodb repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about clidey/whodb

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

See all 58

Talked about on GitHub, Bluesky and Hacker News (58 times).

On GitHub · 48

43 more on GitHub

On Bluesky · 7

2 more on Bluesky
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 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 repository2 other files it gives its agents.

The file

Show its rules and text

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

37 rules. About 0 are common, 29 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈29

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

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

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

    If the ee/ directory is present, read ee/AGENTS.md for additional context.

    line 12
  2. Distinctive:

    GraphQL-first: - All new API functionality via GraphQL.

    line 24
  3. Very specific:

    No SQL injection: - Never use fmt.Sprintf with user input for SQL.

    line 25
  4. Very specific:

    Plugin architecture: - Never use switch dbType or if dbType == in shared code.

    line 26
  5. Very specific:

    Documentation requirements: - All exported Go functions/types need doc comments.

    line 27
  6. Very specific:

    Localization requirements: - All user-facing strings must use t() with YAML keys.

    line 28
  7. Distinctive:

    Show proof: - When making a claim about how something outside of our codebase works, for example a 3rd party library or function, always …

    line 30
  8. Distinctive:

    If multiple interpretations exist, present them — don't pick silently.

    line 42
  9. Distinctive:

    If a simpler approach exists, say so.

    line 43
  10. Distinctive:

    If something is unclear, stop.

    line 44
  11. Distinctive:

    No features beyond what was asked.

    line 50
  12. Distinctive:

    No abstractions for single-use code.

    line 51
  13. Distinctive:

    No error handling for impossible scenarios.

    line 53
  14. Distinctive:

    No fallback logic unless explicitly asked — if you think it's needed, ask first.

    line 54
  15. Distinctive:

    No defensive programming — if an edge case needs handling, ask first.

    line 55
  16. Distinctive:

    If you write 200 lines and it could be 50, rewrite it.

    line 56
  17. Distinctive:

    Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.

    line 59
  18. Distinctive:

    When editing existing code:

    line 65
  19. Distinctive:

    Don't "improve" adjacent code, comments, or formatting.

    line 66
  20. Distinctive:

    Don't refactor things that aren't broken.

    line 67
  21. Distinctive:

    If you notice unrelated dead code, mention it — don't delete it.

    line 69
  22. Distinctive:

    When your changes create orphans:

    line 71
  23. Very specific:

    Remove imports/variables/functions that YOUR changes made unused.

    line 72
  24. Distinctive:

    Don't remove pre-existing dead code unless asked.

    line 73
  25. Distinctive:

    If a styling fix fails twice, stop and ask for guidance (or a reference screenshot / exact value) rather than continuing to guess.

    line 103
  26. Distinctive:

    Add or update focused tests when the behavior is testable and the risk justifies it.

    line 111
  27. Distinctive:

    Run the relevant verification commands and inspect the diff before finishing.

    line 112
  28. Distinctive:

    Treat AGENTS.md as the shared source of truth for Codex, Claude Code via import, opencode, Pi, and other compatible coding agents.

    line 116
  29. Very specific:

    Use .agents/README.md as the index for deeper agent guidance, and read only the relevant linked file before editing.

    line 117
  30. Distinctive:

    Keep always-loaded instructions concise.

    line 118
  31. Distinctive:

    Use planning mode for multi-file, risky, architectural, or ambiguous changes.

    line 119
  32. Distinctive:

    Use separate agents only for bounded sidecar work such as codebase exploration, review, test triage, or documentation lookup.

    line 120
  33. Distinctive:

    Do not run parallel implementation sessions against the same files.

    line 121
  34. Distinctive:

    Ask review-oriented agents to find correctness, regression, security, and missing-test issues first.

    line 122
  35. Very specific:

    Use core/go.mod as the reference point for dependency versions.

    line 211
  36. Distinctive:

    Prefer existing style and local helper APIs over new abstractions

    line 235
  37. Distinctive:

    Only comment edge cases and complex logic, not obvious code

    line 236

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

WhoDB Development Guide

WhoDB is a source-first data management tool. The public GraphQL API and frontend contract are built around SourceType, SourceContract, SourceObject, SourceObjectRef, and SourceSessionMetadata. The current execution layer is still powered mainly by database plugins under core/src/plugins/.

AGENTS.md is the canonical agent instruction file for this repository. Tool- specific files such as CLAUDE.md should import or point to this file instead of duplicating these instructions.

If the ee/ directory is present, read ee/AGENTS.md for additional context. Do not add any code, comments, or references to ee/ in the CE codebase.

Git Commits — Hard Rule

Never commit to main (or any branch) without the user explicitly saying "please commit this for me" (or unambiguously equivalent wording) in that turn. This applies regardless of task framing — "merge it into main locally" or "just write the code changes in main" means apply the file changes on that branch, not create a commit. If committing seems necessary to accomplish what was asked (e.g. to merge a branch), stop and ask first instead of assuming consent.

Terminology

  • "EE agent" / "ee agent" means the in-app WhoDB EE browser AI agent feature (under ee/), NOT the coding-agent (Claude/Codex) configuration or any MCP server. When in doubt, ask which is meant before acting.

Non-Negotiable Rules

  1. GraphQL-first - All new API functionality via GraphQL. Never add HTTP resolvers unless explicitly needed (e.g., file downloads)
  2. No SQL injection - Never use fmt.Sprintf with user input for SQL. Use parameterized queries or GORM builders. See .agents/docs/sql-security.md
  3. Plugin architecture - Never use switch dbType or if dbType == in shared code. All database-specific logic goes in plugins. See .agents/docs/plugin-architecture.md
  4. Documentation requirements - All exported Go functions/types need doc comments. All exported TypeScript functions/components need JSDoc. See .agents/docs/documentation.md
  5. Localization requirements - All user-facing strings must use t() with YAML keys. No fallback strings. No hardcoded UI text. When adding or updating keys, edit en_US only unless the user explicitly asks for other languages. See .agents/docs/localization.md
  6. Verify before completing - For non-trivial tasks, define success criteria before editing. After finishing, verify: (1) type checks pass (pnpm run build:ce for frontend, go build ./cmd/whodb for backend), (2) no linting errors, (3) all added code is actually used (no dead code). See .agents/docs/verification.md
  7. Show proof - When making a claim about how something outside of our codebase works, for example a 3rd party library or function, always provide official documentation or the actual code to back that up. Check online if you have to.

Behavioral Guidelines

These guidelines reduce common LLM coding mistakes. They bias toward caution over speed — for trivial tasks, use judgment.

1. Think Before Coding

Don't assume. Don't hide confusion. Surface tradeoffs.

Before implementing:

  • State your assumptions explicitly. If uncertain, ask.
  • If multiple interpretations exist, present them — don't pick silently.
  • If a simpler approach exists, say so. Push back when warranted.
  • If something is unclear, stop. Name what's confusing. Ask.

2. Simplicity First

Minimum code that solves the problem. Nothing speculative.

  • No features beyond what was asked.
  • No abstractions for single-use code.
  • No "flexibility" or "configurability" that wasn't requested.
  • No error handling for impossible scenarios.
  • No fallback logic unless explicitly asked — if you think it's needed, ask first.
  • No defensive programming — if an edge case needs handling, ask first.
  • If you write 200 lines and it could be 50, rewrite it.
  • Right-size architecture. Start with the simplest surgical fix. Do not propose heavyweight patterns (Temporal workflows, outbox, saga, new infra) unless the simple fix is shown to be insufficient — and explain why before building it.

Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.

3. Surgical Changes

Touch only what you must. Clean up only your own mess.

When editing existing code:

  • Don't "improve" adjacent code, comments, or formatting.
  • Don't refactor things that aren't broken.
  • Match existing style, even if you'd do it differently.
  • If you notice unrelated dead code, mention it — don't delete it.

When your changes create orphans:

  • Remove imports/variables/functions that YOUR changes made unused.
  • Don't remove pre-existing dead code unless asked.

The test: Every changed line should trace directly to the user's request.

4. Goal-Driven Execution

Define success criteria. Loop until verified.

Transform tasks into verifiable goals:

  • "Add validation" → "Write tests for invalid inputs, then make them pass"
  • "Fix the bug" → "Write a test that reproduces it, then make it pass"
  • "Refactor X" → "Ensure tests pass before and after"

For debugging, confirm the root cause with evidence (a log, trace, or minimal repro) before changing code. Don't fix-and-see; if the first fix doesn't hold, re-diagnose rather than trying another speculative fix.

For multi-step tasks, state a brief plan:

1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]

Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.

5. CSS and Styling Changes

Diagnose before editing. One targeted change at a time.

  • For a styling fix, state the specific approach (which selector/property/value and why) before editing.
  • Make one targeted change at a time; don't broadly rewrite styles speculatively.
  • If a styling fix fails twice, stop and ask for guidance (or a reference screenshot / exact value) rather than continuing to guess.

Execution Workflow

For non-trivial tasks, use a short goal-driven loop:

  1. Identify the expected behavior or failure path.
  2. Choose the smallest change that satisfies the request.
  3. Add or update focused tests when the behavior is testable and the risk justifies it.
  4. Run the relevant verification commands and inspect the diff before finishing.

Agent Operating Model

  • Treat AGENTS.md as the shared source of truth for Codex, Claude Code via import, opencode, Pi, and other compatible coding agents.
  • Use .agents/README.md as the index for deeper agent guidance, and read only the relevant linked file before editing.
  • Keep always-loaded instructions concise. Move detailed workflows, checklists, and runbooks into linked docs rather than duplicating them in tool-specific files.
  • Use planning mode for multi-file, risky, architectural, or ambiguous changes. Skip formal plans for obvious single-purpose edits.
  • Use separate agents only for bounded sidecar work such as codebase exploration, review, test triage, or documentation lookup. Do not delegate blocking implementation work when the main session is waiting on it.
  • Do not run parallel implementation sessions against the same files. Use separate worktrees or explicitly disjoint file ownership for parallel work.
  • Ask review-oriented agents to find correctness, regression, security, and missing-test issues first; summaries are secondary.

Project Structure

core/                   # Backend (Go)
  cmd/whodb/main.go     # Entry point — imports plugins and creates GraphQL schema
  src/app/app.go        # AppConfig + Run() — shared server logic
  src/src.go            # Engine initialization (collects from global plugin registry)
  src/engine/registry.go # Global plugin registry (plugins self-register via init())
  src/engine/plugin.go  # PluginFunctions interface
  src/source/           # Source-first public contract + connector/session interfaces
  src/sourcecatalog/    # Public source catalog exposed to GraphQL/frontend
  src/dbcatalog/        # Internal connectable-database catalog adapted into sourcecatalog
  src/env/              # Environment variable declarations (pure, no log dependency)
  src/envconfig/        # Config-loading functions that need both env and log
  src/plugins/          # Database connectors (each has init() calling engine.RegisterPlugin)
                        # Includes: postgres, mysql, sqlite3, mongodb, redis, elasticsearch,
                        #           clickhouse, duckdb, memcached (+ mariadb via mysql)
  graph/schema.graphqls # GraphQL schema
  graph/*.resolvers.go  # GraphQL resolvers

frontend/               # React/TypeScript (uses @clidey/ux component library)
  src/index.tsx        # Entry point
  src/store/           # Redux Toolkit state
  src/generated/       # GraphQL codegen output (@graphql alias)

cli/                    # Interactive TUI CLI (Bubble Tea)
sdk/                    # Platform SDKs (npm @clidey/whodb-sdk, PyPI whodb) — own pnpm
                        # project; wire cores generated from sdk/spec/ (see sdk/README.md)
desktop-ce/             # Desktop app (Wails)
desktop-common/         # Shared desktop code

.github/workflows/      # CI/CD pipelines (release, build, deploy)

Additional agent docs: .agents/docs/build-and-run.md (CE setup and generation), .agents/docs/data-sources.md (adding data sources), .agents/docs/cli.md (CLI), .agents/docs/desktop.md (desktop), .agents/docs/ci-cd.md (GitHub Actions), .agents/docs/testing.md (testing), .agents/docs/analytics.md (PostHog analytics contract). EE-specific source additions are in ee/.agents/docs/data-sources.md.

Testing

See .agents/docs/testing.md for comprehensive testing documentation including:

  • Frontend Playwright E2E tests
  • Docker container setup for test databases
  • Go backend unit and integration tests
  • CLI tests

Quick reference:

# Frontend Playwright E2E
cd frontend && pnpm e2e:ce:headless         # Headless (all databases)
cd frontend && pnpm e2e:ce                  # Interactive (headed)

# Backend Go tests
bash dev/run-backend-tests.sh all           # Unit + integration

# CLI tests
bash dev/run-cli-tests.sh                   # All CLI tests

Domain-Specific Guidelines

For language-specific or domain-specific guidelines, refer to the shared rules in .agents/rules/:

  • Go Backend (core/, cli/): .agents/rules/go-backend.md
  • React Frontend (frontend/): .agents/rules/react-frontend.md
  • GraphQL (**/graph/, **/*.graphqls): .agents/rules/graphql.md
  • Localization (**/locales/): .agents/rules/localization.md
  • E2E Tests (frontend/e2e/): .agents/rules/e2e-tests.md
  • Desktop (desktop-ce/, desktop-common/): .agents/rules/desktop.md
  • CI/CD (.github/): .agents/rules/ci-cd.md

Procedures

For multi-step tasks, follow the step-by-step workflows in .agents/workflows/. Read the relevant file before starting:

TaskGuide
Add a new database plugin.agents/workflows/new-plugin.md
Add a GraphQL query/mutation end-to-end.agents/workflows/new-graphql-field.md
Add a new frontend page.agents/workflows/new-frontend-page.md
Add or update translation keys.agents/workflows/add-translation.md
Add a CLI command or TUI view.agents/workflows/cli-feature.md
Add or modify desktop app functionality.agents/workflows/desktop-feature.md
Add a platform-constrained HTTP handler.agents/workflows/platform-constrained-handler.md
Prepare or consume a handoff.agents/workflows/task-handoff.md
Prove claims about external behavior.agents/workflows/research-proof.md
Pre-commit verification.agents/workflows/review-checklist.md

When Updating Dependencies

Use core/go.mod as the reference point for dependency versions.

Commands Quick Reference

See .agents/docs/commands.md for full reference.

# Backend: cd core && go run ./cmd/whodb
# Frontend: cd frontend && pnpm start
# CLI: cd cli && go run .

Architecture

  • Plugin self-registration — each plugin has init() { engine.RegisterPlugin(...) }. The entry point's blank imports control which plugins are registered
  • Source-first public API — new public GraphQL/frontend work should use SourceTypes, SourceProfiles, SourceFieldOptions, SourceSessionMetadata, SourceObjects, SourceRows, RunSourceQuery, and SourceGraph. Do not add new public Database* queries or capability surfaces
  • AppConfig DI — core/src/app/app.go defines AppConfig (schema, HTTP handlers). The entry point calls app.Run(config, staticFiles)
  • HTTP route extensions — CE-owned HTTP routes live in core/graph/SetupHTTPServer. Edition or platform add-ons register their own non-GraphQL routes with graph.RegisterHTTPRoutes; do not add add-on route names or unsupported stubs to CE.
  • Frontend registries — components (registerComponent), source types (registerSourceTypeOverrides), icons (registerIcons), and source utilities (registerSourceUtilities) can be registered at boot. The frontend renders from registries — if something isn't registered, it's not shown
  • Import cycle note — src → router → graph → src cycle exists. Run() lives in src/app/ (not src/) to avoid it. Never add router/graph imports to src/

Development Principles

  • Clean, readable code over clever code
  • Prefer existing style and local helper APIs over new abstractions
  • Only comment edge cases and complex logic, not obvious code
  • Maintain professional, neutral tone without excessive enthusiasm

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.