agentleFS
RubiYHRubiYH/teamem/AGENTS.md

teamem

AGENTS.md1 starsChanged 6 months agoApache-2.0View on GitHub

Teamem is an MCP-based team memory and coordination system. The repo contains the Bun/Hono/SQLite runtime, the Claude Code marketplace plugin, the npm bootstrapper CLI, Teamem Cloud web control plane, public docs, internal design notes, and tests. This top-level file is the repo-wide Codex contract. Detailed implementation rules belong in the nearest child AGENTS.md; read that file before changing anything under a child directory. - Use Bun for repo scripts. The runtime imports bun:sqlite; plain Node cannot run the server/test surface…

  • Reads credentials
  • 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,439 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 repository8 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

28 rules. About 1 is common, 15 are distinctive, and 12 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 12

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Use Bun for repo scripts. The runtime imports bun:sqlite.

    line 30
  2. Very specific:

    Use bun run <script> for package scripts.

    line 32
  3. Very specific:

    Keep NodeNext ESM imports explicit: local relative imports in TypeScript must use .js extensions.

    line 35
  4. Distinctive:

    Keep diffs small, reviewable, and scoped to the requested change.

    line 37
  5. Distinctive:

    Do not add dependencies unless explicitly requested or clearly justified by the existing design.

    line 39
  6. Very specific:

    Do not commit real .env files, credentials, generated runtime databases, or local .teamem/, .omc/, .omx/, dist/, cache, or build artifacts …

    line 41
  7. Distinctive:

    If a change affects user-facing commands, setup, deployment, env vars, plugin behavior, or operator workflows, update the relevant docs/env …

    line 44
  8. Distinctive:

    Read the nearest child AGENTS.md first.

    line 52
  9. Distinctive:

    Do not edit Claude Code installed plugin cache files directly.

    line 79
  10. Distinctive:

    Verify with the smallest gate that proves the change, then broaden when the touched surface requires it.

    line 85
  11. Very specific:

    Run bun run build:plugin after any change to plugin bundle sources: src/bridge/, src/channel/, or src/cli/setup.ts.

    line 96
  12. Very specific:

    Run bun run web:smoke:deploy for Teamem Cloud deploy/env changes when the required env is available.

    line 98
  13. Very specific:

    Run package-local gates from the relevant child AGENTS.md for packages/bootstrapper-cli/, apps/web/, plugin/, and specialized test …

    line 100
  14. Distinctive:

    Use this section for Codex GitHub review.

    line 106
  15. Common:

    Do not require deploy credentials, live Supabase/PostHog credentials, or live Claude plugin smoke gates for ordinary static PR review …

    line 130
  16. Distinctive:

    Treat docs typos as P1 only when they change commands, env vars, security guidance, setup steps, release behavior, or operator workflow.

    line 133
  17. Distinctive:

    When a finding depends on a child AGENTS.md, cite the closest applicable file-specific contract in the review comment.

    line 136
  18. Distinctive:

    Before committing, run git status --short, inspect staged and unstaged diffs, and stage only files that belong to the requested change.

    line 141
  19. Distinctive:

    Before committing, review the full candidate diff against the applicable AGENTS hierarchy and determine whether repo guidance changed.

    line 144
  20. Very specific:

    Commit messages must use the Lore protocol with an intent line first and useful trailers such as Constraint:, Rejected:, Confidence:, …

    line 149
  21. Very specific:

    Every agent-authored commit must include: Co-authored-by: OmX <omx@oh-my-codex.dev>.

    line 152
  22. Distinctive:

    Use inline git commit -m ...

    line 154
  23. Very specific:

    Do not use --no-verify, do not push, and do not amend an existing commit unless the user explicitly asks.

    line 156
  24. Distinctive:

    Do not silently widen scope, rewrite unrelated history, or revert dirty files you did not create.

    line 161
  25. Very specific:

    Do not hardcode .git/hooks/.

    line 163
  26. Distinctive:

    Do not reintroduce human slash-command surfaces for claim cleanup unless a product decision explicitly asks for them.

    line 164
  27. Very specific:

    Do not blur web account identity with Teamem runtime member identity.

    line 166
  28. Distinctive:

    Do not treat green tests as proof for cross-cutting lifecycle work without at least one review pass over contracts, docs, and operator …

    line 167

≈ “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
<!-- Updated: 2026-06-08 -->

teamem

Teamem is an MCP-based team memory and coordination system. The repo contains the Bun/Hono/SQLite runtime, the Claude Code marketplace plugin, the npm bootstrapper CLI, Teamem Cloud web control plane, public docs, internal design notes, and tests.

This top-level file is the repo-wide Codex contract. Detailed implementation rules belong in the nearest child AGENTS.md; read that file before changing anything under a child directory.

Repo Map

PathOwner surface
src/Runtime source: domain, infra, server tools, bridge, channel, CLI, setup, hooks
plugin/Claude Code marketplace plugin, commands, hooks, scripts, bundled runtime
packages/bootstrapper-cli/npm package @rubiyh05/teamem and the teamem binary
apps/web/Teamem Cloud Next.js control plane
tests/Unit, integration, scenario, plugin, smoke, migration, security, perf, load, chaos
docs/Public user/operator docs
.docs/Internal plans, ADRs, operations notes, and architecture notes
data/Local SQLite/runtime data; generated DBs are not normal source
.github/CI and ownership metadata

Must Follow

  • Use Bun for repo scripts. The runtime imports bun:sqlite; plain Node cannot run the server/test surface correctly.
  • Use bun run <script> for package scripts. Important root scripts include test, typecheck, lint, format, format:check, build, build:plugin, server, bridge, channel, setup, and teamem.
  • Keep NodeNext ESM imports explicit: local relative imports in TypeScript must use .js extensions.
  • Keep diffs small, reviewable, and scoped to the requested change. Prefer deletion, existing utilities, and existing patterns before adding new layers.
  • Do not add dependencies unless explicitly requested or clearly justified by the existing design.
  • Do not commit real .env files, credentials, generated runtime databases, or local .teamem/, .omc/, .omx/, dist/, cache, or build artifacts unless the relevant child AGENTS.md says that artifact is committed.
  • If a change affects user-facing commands, setup, deployment, env vars, plugin behavior, or operator workflows, update the relevant docs/env examples in the same change or record the known docs gap.
  • Respect the product boundary: Teamem Cloud is the web control plane; the Teamem runtime/plugin remain the runtime identity and coordination surfaces.

Development

  • Read the nearest child AGENTS.md first. Deeper files override this file for their subtree.
  • Source architecture is layered: pure domain logic stays under src/domain/; SQLite/projection side effects stay under src/infra/; MCP/tool wiring stays under src/server/ and src/bridge/.
  • Event-sourced state changes must preserve the append-plus-projection contract: emit validated events, append them through the store, and keep projection rebuild behavior in sync with inline projection updates.
  • Bridge responseSchema entries are documentation-only. When tool output shapes change, update the bridge schema by hand and add/adjust tests because runtime validation will not catch schema drift.
  • Plugin runtime code is distributed through committed bundles under plugin/lib/. Changes to src/bridge/, src/channel/, or src/cli/setup.ts require bun run build:plugin and committed fresh bundles.

Deploy And Release

  • Root runtime deploy changes must keep .env.example, Docker/deploy docs, and quickstart docs aligned.
  • Teamem Cloud web changes must keep apps/web/.env.example, docs/deploy/teamem-cloud.md, public README references, and i18n strings in sync when the user/operator contract changes.
  • Plugin marketplace changes must follow plugin/AGENTS.md: bump the mirrored plugin and marketplace versions when marketplace users need a new artifact.
  • Bootstrapper CLI changes must follow packages/bootstrapper-cli/AGENTS.md: preserve plugin ownership of MCP JSON, pinned marketplace identifiers, scoped installs, dry-run behavior, and first-class uninstall cleanup.
  • Do not edit Claude Code installed plugin cache files directly. Change source, bump the plugin version when needed, clear/reinstall cache only as an explicit local validation step, and never commit cache artifacts.

Verification

  • Verify with the smallest gate that proves the change, then broaden when the touched surface requires it.
  • Standard repo gates before declaring broad runtime work complete:
bun test
bun run typecheck
bun run lint
bun run build:plugin
  • Run bun run build:plugin after any change to plugin bundle sources: src/bridge/, src/channel/, or src/cli/setup.ts.
  • Run bun run web:smoke:deploy for Teamem Cloud deploy/env changes when the required env is available; otherwise state the env gap.
  • Run package-local gates from the relevant child AGENTS.md for packages/bootstrapper-cli/, apps/web/, plugin/, and specialized test directories.

Review guidelines

Use this section for Codex GitHub review. Keep findings focused on high-confidence P0/P1 issues that would block merge or create serious regression risk. Do not comment on style-only nits, speculative rewrites, low-impact typos, or preference-level refactors.

  • Prioritize correctness, security, and data-safety defects: auth/JWT and room code access control, scope claim ownership and release semantics, event append/projection parity, idempotency and retry behavior, secrets or PII leakage, SQLite migration compatibility, and the Teamem Cloud versus runtime identity boundary.
  • For plugin and marketplace changes, verify shipped artifact parity. Source changes under src/bridge/, src/channel/, or src/cli/setup.ts require regenerated plugin/lib/*.js bundles. Marketplace-user behavior changes need mirrored version bumps in plugin/.claude-plugin/plugin.json and .claude-plugin/marketplace.json.
  • For Teamem Cloud web changes, verify the deploy/env contract. Required env keys must stay aligned with apps/web/.env.example and docs/deploy/teamem-cloud.md; browser NEXT_PUBLIC_* values are build-time values; web account identity must not be treated as Teamem runtime member identity.
  • For tests and CI, flag green-but-weak evidence when the touched surface needs a narrower gate. Plugin live smokes must remain opt-in and skip cleanly without live env. CI-safe tests must not depend on ignored or generated artifacts, local caches, installed Claude plugin state, or production secrets.
  • Do not require deploy credentials, live Supabase/PostHog credentials, or live Claude plugin smoke gates for ordinary static PR review unless the PR claims live/deploy coverage.
  • Treat docs typos as P1 only when they change commands, env vars, security guidance, setup steps, release behavior, or operator workflow. Otherwise avoid typo-only review comments.
  • When a finding depends on a child AGENTS.md, cite the closest applicable file-specific contract in the review comment.

Commits

  • Before committing, run git status --short, inspect staged and unstaged diffs, and stage only files that belong to the requested change. Leave unrelated user or generated changes alone.
  • Before committing, review the full candidate diff against the applicable AGENTS hierarchy and determine whether repo guidance changed. When commands, env vars, release behavior, setup, verification, or agent workflow changed, update the nearest relevant AGENTS.md files and include those AGENTS updates in the same commit as the behavior/docs change they describe.
  • Commit messages must use the Lore protocol with an intent line first and useful trailers such as Constraint:, Rejected:, Confidence:, Scope-risk:, Directive:, Tested:, and Not-tested:.
  • Every agent-authored commit must include: Co-authored-by: OmX <omx@oh-my-codex.dev>.
  • Use inline git commit -m ... message arguments so local hooks can inspect the message before commit execution.
  • Do not use --no-verify, do not push, and do not amend an existing commit unless the user explicitly asks.

Always Avoid

  • Do not silently widen scope, rewrite unrelated history, or revert dirty files you did not create.
  • Do not hardcode .git/hooks/; respect core.hooksPath and worktrees.
  • Do not reintroduce human slash-command surfaces for claim cleanup unless a product decision explicitly asks for them; claim cleanup stays MCP/hook-driven.
  • Do not blur web account identity with Teamem runtime member identity.
  • Do not treat green tests as proof for cross-cutting lifecycle work without at least one review pass over contracts, docs, and operator paths.

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.