Teams & Conventions
Appgrammar supports multi-tenant teams with role-based access control and coding conventions that are automatically injected into the execution context when agents run team-owned appgrammars.
Teams
Create a team to share appgrammars, enforce coding standards, and track execution analytics across your organization.
Creating a Team
In the web UI, go to Teams in the sidebar and create a new team. You become the owner. Invite members by email -- they receive an invitation and must accept before gaining access.
Transferring Appgrammars
Any team member can transfer a personal appgrammar to the team via POST /api/appgrammars/:id/transfer. Once transferred, the appgrammar is governed by team RBAC and conventions.
Role-Based Access Control
Teams use a hierarchical role system. Each higher role inherits all permissions from lower roles.
| Role | Permissions |
|---|---|
| Viewer | Read-only access to team appgrammars |
| Member | Execute plans, create appgrammars, transfer appgrammars to team |
| Admin | Invite/remove members, change roles, view audit log, edit settings, view analytics |
| Owner | Delete team, transfer ownership (one owner per team) |
The web UI adjusts visible actions to the active member's role — you won't see admin-only controls as a viewer.
Audit Logging
All team mutations are recorded to an audit log with the action, resource, metadata, user, and request metadata. Admins and owners can view it at Team > Audit, filterable by action, user, and date range.
Team-Scoped MCP Connections
When an AI agent connects to appgrammar via MCP, you can set the team context at the connection level using the X-Team-Id header. This means:
- Every appgrammar created through that connection automatically belongs to the team
- Team conventions are injected into execution prompts without per-call configuration
- Tool operations (breed, splice, etc.) default to team ownership
Set up a team connection by adding the header to your MCP config:
claude mcp add --transport http appgrammar-myteam https://appgrammar.com/mcp \
--header "Authorization: Bearer YOUR_TOKEN" \
--header "X-Team-Id: YOUR_TEAM_UUID"
The MCP & Hooks page in the web UI has a Team scope selector that generates the correct configuration snippet for your IDE. See MCP Token Management for full configuration examples.
Conventions
Conventions are team-level coding rules written in Markdown. They get injected into the system prompt when an agent executes a team-owned appgrammar.
Creating a Convention
Each convention has:
- Title -- a descriptive name (e.g., "Error Handling Standards")
- Body -- Markdown content with the actual rules and examples
- Technology tags -- an array like
["typescript", "react"]that controls when the convention applies - Category -- optional grouping (e.g., "security", "testing", "style")
In the web UI, go to Team > Conventions and use the convention editor. Tags are selected from the technology tag picker.
How Injection Works
When an agent calls appgrammar_start on a team-owned appgrammar, conventions matching the appgrammar's technology tags are formatted as Markdown sections and appended to the system prompt. The agent receives them as part of the execution response — no additional configuration is needed.
Convention Packs
A convention pack is a named collection of conventions. Packs can be marked as default for a team, meaning their conventions are always included regardless of tag matching.
Use packs to group related conventions (e.g., a "Security Pack" containing XSS prevention, CSRF protection, and input validation rules). Manage packs at Team > Conventions > Packs.
Personal Conventions
Individual users can also create personal conventions that apply to their own appgrammars. These work identically to team conventions but are scoped to a single user rather than a team.
Team Analytics
Admins and owners can view aggregate execution metrics at Team > Analytics:
- Overview -- total executions, completion rate, success rate, average execution time, active appgrammars (configurable time window, default 30 days)
- Per-appgrammar stats -- table of each team appgrammar with individual execution metrics
- Trends -- daily time series of execution counts