teamem / plugin
AGENTS.md1 starsChanged 6 months agoApache-2.0View on GitHub
The Claude Code plugin distribution for Teamem. This directory contains the marketplace plugin manifest, slash commands, git hooks, hook configuration, prebuilt JavaScript bundles (committed; built from src/), monitors, agents, and skills. The plugin is self-contained as a marketplace artifact installed through teamem init / teamem update; source-checkout development loads it for one Claude Code session with claude --plugin-dir /absolute/path/to/teamem/plugin.
- Reads credentials
- Deletes or force-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,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.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- hooks/AGENTS.mdAGENTS.md
- plugin-e2e-module/AGENTS.mdAGENTS.md
- src/AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- rddSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 40
Marketplace version gate: If a change must reach users through teamem update, teamem claude install/status/uninstall, or claude plugin …
- Very specific: line 67
Command component hygiene: Do not put AGENTS.md or other non-command markdown files directly in commands/.
- Very specific: line 78
Before committing, check that the installed Claude cache is not being edited directly and that the staged diff contains source/plugin …
≈ “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.
Files
<!-- Parent: ../AGENTS.md --><!-- Generated: 2026-05-09 | Updated: 2026-06-02 -->plugin
Purpose
The Claude Code plugin distribution for Teamem. This directory contains the marketplace plugin manifest, slash commands, git hooks, hook configuration, prebuilt JavaScript bundles (committed; built from src/), monitors, agents, and skills. The plugin is self-contained as a marketplace artifact installed through teamem init / teamem update; source-checkout development loads it for one Claude Code session with claude --plugin-dir /absolute/path/to/teamem/plugin.
Key Files
| File | Description |
.claude-plugin/plugin.json | Marketplace manifest: name, current plugin version, skills path, MCP servers config |
.mcp.json | MCP server declarations (teamem-channel for Channels POC) |
README.md | User-facing installation, activation model, phase 1 Channels POC guide |
hooks/hooks.json | Claude lifecycle hooks: SessionStart, PreToolUse, Stop, and disabled Notification routing — active hooks route to bash scripts only |
Subdirectories
| Directory | Purpose |
.claude-plugin/ | Plugin manifest and metadata — see .claude-plugin/AGENTS.md |
agents/ | Subagent prompts (currently briefing only; watcher/negotiator runtime is postponed) |
bin/ | Executable entry points (teamem-call, teamem-flag, teamem-monitor) — see bin/AGENTS.md |
commands/ | Slash command markdown files for non-claim user workflows; claim lifecycle is MCP/hook-driven |
git-hooks/ | Git hooks for claim lifecycle (post-commit, post-checkout) — see git-hooks/AGENTS.md |
hooks/ | Claude hook configuration and dispatch — see hooks/AGENTS.md |
lib/ | Prebuilt JavaScript bundles (bridge.js, channel.js, setup.js) — see lib/AGENTS.md |
monitors/ | Monitor configuration and launch scripts — see monitors/AGENTS.md |
scripts/ | Bash runtime utilities (gate-claim.sh, release-claims.sh, session-start.sh, _common.sh) — see scripts/AGENTS.md |
skills/ | Teamem-specific skills (handoff, onboarding) — see skills/AGENTS.md |
For AI Agents
Working In This Directory
- Bundled artifact model: The plugin ships as a single marketplace install. All runtime logic lives in committed
.jsbundles. Source code for these bundles lives insrc/at the project root; for bundle-source changes, rebuild withbun run build:plugin. - Plugin version: Bump the version in
plugin/.claude-plugin/plugin.jsonbefore each plugin iteration and mirror the same version in the root.claude-plugin/marketplace.json. Plugin command, hook, script, manifest, skill, agent, monitor, or bundled-runtime changes need this bump so Claude Code marketplace/cache consumers see the update. - Marketplace version gate: If a change must reach users through
teamem update,teamem claude install/status/uninstall, orclaude plugin update teamem@teamem-alpha, verify both manifests were bumped before committing. - Cache integrity: Claude Code validates
~/.claude/plugins/cache/...— never edit cache files directly. Always: change source → bump version inplugin.json→ clear cache (rm -rf ~/.claude/plugins/cache/<plugin>) → reinstall. - Marketplace trust: The plugin is self-contained. All dependencies (Bun, Node, MCP SDK) are resolved at plugin execution time, not installation time. Hooks assume Bun is available; they exit gracefully if not.
- Channels local-dev startup:
--plugin-dirloads commands/agents, but a development channel still needs the--dangerously-load-development-channels server:teamem-channelflag and a real.mcp.jsonteamem-channelentry in the launching repo. Placeholder paths such as/path/to/teamem/plugin/lib/channel.jsmake/mcpshow the server as failed. - Plugin data slug drift: Local plugin development commonly writes under
~/.claude/plugins/data/teamem-inline, notteamem. Human runbooks should usefind ~/.claude/plugins/data -path '*teamem*' ...for logs instead of hardcoding one slug. - Two-persona local E2E: Distinct computers should use the normal default
~/.teamem/credentials.jsonon each machine. Only when simulating Alice and Bob on one machine, avoid overwriting the default file back and forth by launching each Claude Code session with a distinctTEAMEM_CREDENTIALSpath (for example/tmp/teamem-alice.credentials.jsonand/tmp/teamem-bob.credentials.json). - Fresh local reset: A fresh DB is not enough for end-to-end retests. Also clear persona credentials and plugin session state (
~/.teamem/credentials.json, anyTEAMEM_CREDENTIALSfiles,~/.claude/plugins/data/teamem*, and repo-localTEAMEM.md) or Claude Code may keep authenticating against an old space. - npm bootstrapper boundary: The npm
teamemCLI inpackages/bootstrapper-cliinstalls/updates this marketplace plugin and delegates setup here. Do not move MCP JSON writing into the bootstrapper; this plugin remains the MCP manifest owner. - Teamem-aware launcher transition:
teamem ccremains compatibility-only and exits non-zero with migration guidance. The installed Teamem-ownedclaudeshim owns prompt/pure-vs-Teamem launch selection, readiness checks, plugin-owned activation intent/default Space behavior, and reversible cleanup. Do not re-teach the oldteamem ccdevelopment-channel launch path here. - Marketplace repo name: Bootstrapper defaults must point at
https://github.com/RubiYH/teamem, not the oldteamem-pocrepo name.
Common Patterns
- Hook dispatch (
hooks/hooks.json): Maps Claude events (SessionStart, PreToolUse, etc.) to bash scripts or agent subagents. Bash hooks must usebash "$CLAUDE_PLUGIN_ROOT"/scripts/X.sh(shebang exec fails silently in Claude Code). - Bridge entry point (
bin/teamem-call): Thin wrapper that resolves${CLAUDE_PLUGIN_ROOT}and runsbun run ${PLUGIN_ROOT}/lib/bridge.js call <tool> [args]. Used by slash commands that need synchronous MCP tool invocation. - Plugin root resolution: Scripts resolve plugin root via
${CLAUDE_PLUGIN_ROOT}(set by Claude Code) or fallback to relative path. Template substitution__TEAMEM_PLUGIN_ROOT__is resolved by the installer for git hooks. - Claim lifecycle hooks:
PreToolUsecallsgate-claim.sh(claim/refresh scope before file edits);Stopcallsrelease-claims.shfor telemetry only (claims survive session end);SessionStartcallssession-start.sh(stdout briefing prompt injection on startup/resume, Space Rules sync, decision/gotcha replay, durable notifications). The hook prompt is only an instruction for the main agent to perform the actualget_briefingread. - Claim cleanup boundary: Claim cleanup is MCP/hook-driven, not a human slash-command surface. Agents may use
teamem.list_claimsandteamem.force_release; do not add/teamem:claimsor/teamem:force-releasecommand files without an explicit product decision. - Slash command format: Each
.mdfile incommands/is a complete command. Frontmatter includesdescription,allowed-tools, andargument-hint. Steps follow imperative logic (parse args, validate, call tools, format response). - Slash command naming: The plugin manifest name already supplies the
/teamem:namespace. Keep command filenames short (commands/status.mdbecomes/teamem:status) and do not add a secondteamem-prefix. - Slash command MCP names: Teamem MCP tools are exposed with the
teamem_suffix in canonical installed sessions, for examplemcp__teamem__teamem_get_briefing. Source-checkout local plugin sessions can expose the same tools with a plugin-scoped prefix such asmcp__plugin_teamem_teamem__teamem_get_briefing. User-facing commands should allow the canonical name and the plugin-scoped fallback when both surfaces are relevant. - Command component hygiene: Do not put
AGENTS.mdor other non-command markdown files directly incommands/; Claude plugin validation treats every markdown file there as a command component. Keep command guidance in this file. - Subagent prompt format: Each
.mdfile inagents/is a complete Claude prompt (not a skill). Do not putAGENTS.mdor other non-agent markdown files directly inagents/; Claude plugin validation treats every markdown file there as an agent component. - Channels proof points: For channel smoke tests,
channel.logplusnotifications.logprove the plugin polled and emitted. They do not prove Claude Code rendered the event;/mcp, startup flags, org policy, and Claude debug logs own that layer. - Channels conflict boundary: Normal queue-first file-claim conflicts stay on the hook denial and pending-edit queue path. Do not document or implement ordinary conflict Channel alerts unless the product decision changes; legacy/internal
permission_requestedChannel alerts are a separate compatibility path. - Space Rules replica:
TEAMEM.mdis the user-visible local replica and is gitignored. It should be created/rewritten only through/teamem:rule init,/teamem:rule update, and theSessionStartmanaged-block sync; do not documentsnapshot.jsonas a required user artifact.
Pre-Commit Checklist
- For plugin manifest, command, monitor, hook, script, or runtime behavior changes, confirm whether marketplace users need a new plugin artifact. If yes, bump the mirrored plugin and marketplace versions in the same commit.
- For changes under
src/bridge/,src/channel/, orsrc/cli/setup.ts, runbun run build:pluginand commit the regeneratedplugin/lib/*.jsbundles. - For plugin activation, hook, monitor, or delivery behavior, run the relevant focused
tests/plugin/*.test.tsfiles plusbun run typecheck; usebun run lintwhen TypeScript, test, or docs lint coverage is touched. - Before committing, check that the installed Claude cache is not being edited directly and that the staged diff contains source/plugin files, not
~/.claude/plugins/cache/...artifacts.
Dependencies
Internal
src/bridge/index.ts→ builds tolib/bridge.js(MCP tool bindings, stdio server)src/cli/setup.ts→ builds tolib/setup.js(interactive setup wizard)src/channel/index.ts→ builds tolib/channel.jsviabun run build:channelorbun run build:plugin(Channels POC runtime)- Project root
.omc/issues/(PRDs, ADRs, acceptance slices) src/domain/claim-identity-core.ts(canonical repo_id canonicalization — must stay in lockstep with bash equivalents ingit-hooks/andscripts/)src/domain/git-evidence.ts(SHA validation, git release evaluation)
External
@modelcontextprotocol/sdk^1.0 (MCP stdio server)hono^4.6 (HTTP client in bridge for server calls)zod^3.23 (input validation in bridge tool bindings)bun(runtime for bundles; Claude Code assumes Bun is available on user's machine)
<!-- MANUAL: -->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
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.

