Skip to main content

Authoring agents

~26 expert agents form the platform's roster (reconciled to agent-taxonomy.md, ADR-002 β€” the source of truth). Each is a single markdown file under .claude/agents/, sized 15–25 KB, written in the canonical template (the agent template). The Policy Engine loads them lazily at step 5 of /continue based on the matched policies' required_agents clauses β€” see policy-engine.md and ai-engineering-strategy.md Β§12.

This page is the authoring guide. The live roster renders at the Agents landing (auto-generated from the agent files); the agent template is the shape to copy.

How agent files work in Claude Code​

Claude Code reads agent files from .claude/agents/<name>.md (project) and ~/.claude/agents/<name>.md (user). The frontmatter is parsed; the body becomes the agent's custom system prompt when the auto-router or an explicit @agent-<name> invocation activates it. Reference: Anthropic sub-agents docs.

Each BeWith agent uses these frontmatter fields:

  • name (required) β€” kebab-case, matches filename.
  • description (required) β€” what the agent owns and when it's invoked. Includes "use proactively" when auto-routing is desired (Anthropic's documented pattern).
  • tools (recommended) β€” restrictive allowlist. Most BeWith reviewer/gatekeeper agents are limited to Read, Grep, Glob, Bash so they can inspect but not modify; implementer agents inherit all tools.
  • model: inherit (recommended) β€” follow the session's model unless there's a reason to override.

Status​

#AgentStatusOwnsToolsSource for content
1process-guardianwrittenDefinition-of-Done gate before any task closesRead, Grep, Glob, BashAI_GOVERNANCE/workflows/definition-of-done.md
2code-reviewerwrittenTen-point pre-PR review; loaded automatically before PR openRead, Grep, Glob, Bashagents-developer-kit/agents/CODE_REVIEWER.md (1322 lines)
3architectwrittenDesign authority β€” microservice boundaries, RPC vs HTTP, DB choice, code archaeology, legacy boundary, ADR-vs-design-doc judgmentRead, Grep, Glob, WebFetch, Writeagents-developer-kit/agents/ARCHITECT.md (1155 lines, distilled)
4backend-developerwrittenNestJS implementer (backend-services monorepo) β€” controller/service/repository in the existing pattern; follows @bewith-dev/eslint-plugin rules; defers data/contracts/auth/messaging/payments/search/AI/obs to their owners.inherit allorg scan of backend-services + @bewith-dev/eslint-plugin rules
5frontend-developerwrittenReact + Next implementer β€” dashboards (Next+MobX+MUI/Emotion) and consumer (Next15+Zustand+Tailwind+next-intl); rhf+Zod, TanStack Query, RTL/a11y. Assembles from the DS; defers components/i18n/contract/a11y to owners.inherit allorg scan of the web frontends + @bewith-dev/eslint-plugin FE rules
6qa-engineerwrittenTesting authority across all levels β€” Jest (+ @nestjs/testing, supertest), mongodb-memory-server (in-memory Mongo) / Testcontainers for integration, Playwright e2e; owns strategy + coverage, implementers write unit tests.inherit allorg scan (real stack is Jest, not Vitest)
7product-managerwrittenProduct judgment — is this worth building, business/ICP-aligned, and what's the priority (owns prioritization between unrelated features). Owns the AI-consumable PRD→Design Doc chain. Distinct from gatekeeper (readiness).Read, Grep, Glob, WebFetch, Writeproduct-rd-handoff + docs/company + Gali
8design-systemwrittenOwns @bewith-dev/design-system β€” tokens (palette.ts), ~40 MUI components, Storybook, RTL/theme, the COMPONENTS.md catalog (PRD Β§7.2 anchors to it), changesets. The shared UI SoT.inherit allorg scan: @bewith-dev/design-system repo
9databasewrittenOne DBA persona β€” schema design + migrations (via migrations-tool) + indexing + query perf + cross-store consistency across Mongo (Mongoose), Aurora/MySQL (TypeORM), Redis. OpenSearch is search-vector's.inherit allorg scan of libs/schemas + migrations-tool CLI
10devops-infrawrittenEKS primary (Terraform EKS + Pulumi + Helm + ArgoCD GitOps), ECS secondary (CDK); GitHub Actions CI/CD; ECR/GHCR base images; Secrets Manager; multi-region; the shared CI hard-gate.inherit allorg scan: IAC-Terraform, Kubernetes-deployments, cdk-infra
11auth-securitywrittenAuth + security authority β€” Cognito passwordless (OTP Lambda triggers), JWT (aws-jwt-verify), RBAC (org/community/resident), OWASP, secrets. Mandatory on any auth touch; designs+reviews, hands impl to backend-developer.Read, Grep, Glob, Bashorg scan: cognito-lambdas + apps/auth/apps/authorization
12privacy-compliancewrittenGDPR + Israeli Privacy Law β€” PII classification, minimization, lawful basis/consent, retention, user rights (erasure cascade incl. Cognito), no PII in logs/3rd-party, cross-border. Advises; escalates real legal Qs.Read, Grep, Globstandard content + bewith data context
13contracts-schemawrittenFE↔BE + inter-service contract oversight β€” classifies additive/breaking, scans all repos for consumers + updates them (frontends hand-roll Zod, v3/v4 drift), defines contracts up-front against the real DTO. No codegen (Aviad).Read, Grep, Glob, Bash, Edit, Writecontracts-schema audit
14observabilitywrittenVendor-neutral logs + metrics + traces + dashboards + alerts (Grafana Loki + CloudWatch + Winston). Defines what to emit + post-deploy watch; implementers add lines. Datadog being dropped β€” no vendor coupling.Read, Grep, Glob, Bashorg scan: Winston + loki-cloudwatch-forwarder
15i18n-localizationwritteni18n + RTL authority — i18next/next-i18next/next-intl (per app), he/en locale files, camelCase keys + namespaces + typed resources, RTL via stylis-plugin-rtl, useAppData→useTranslation migration.Read, Grep, Glob, Edit, Bashorg scan + cursor-rules i18n conventions
16legacy-php-guidewrittenYii2/PHP (superco-consumer, superco-management BE) β€” DEPRECATION TARGET: bug fixes / smallest-safe-change, NO new features (β†’ NestJS / React-in-iframe); auth/payments β†’ human review. PHP = separate PHPCS/PHPStan track.Read, Grep, Glob, Bashorg scan: superco-consumer
17prd-writerwrittenProduces PRDs that R&D reads (audience: product). Fills the PRD template, anchors UI to COMPONENTS.md, self-checks Definition of Ready, hands to gatekeeper. WHAT/WHY only, never HOW.Read, Grep, Glob, WebFetch, Writedocs/templates/prd.md + docs/methodology/product-rd-handoff.md (PR #44)
18gatekeeperwrittenDual-mode readiness gate (audience: both). Mode A: PRD Definition of Ready before draft β†’ ready-for-rd. Mode B: Design Doc readiness before draft β†’ approved. Independent binary block on any P0 gap; the pre-build twin of process-guardian.Read, Grep, Globdocs/templates/prd.md + docs/templates/design-doc.md + closed v1 (PR #43)
19paymentswrittenMoney authority β€” Stripe + Payme; charges/refunds/withdrawals, idempotency, webhooks, reconciliation, no raw card data. Mandatory on money touches; designs+reviews, hands plumbing to backend-developer.Read, Grep, Glob, Bashorg scan: apps/payments (Stripe ^9.4.0 + Payme + withdrawals)
20notificationswrittenMulti-channel delivery (SES/Vonage/Smsim/Meta WhatsApp/Bulldog), campaigns, OTP, channel routing+fallback, idempotent send, status/retries, opt-out. Owns delivery; rides async-messaging; content→i18n.Read, Grep, Glob, Bashorg scan: sqs-consumer notification hub
21async-messagingwrittenEventing backbone β€” SQS, @MessagePattern RPC, cron, idempotency, at-least-once+DLQ, outbox, ordering. Defines delivery semantics; backend-developer wires handlers.Read, Grep, Glob, Bashorg scan: sqs-consumer 9-queue hub + RPC
22ai-llmwrittenLLM authority β€” provider abstraction (Bedrock/Anthropic/OpenAI), prompt engineering + structured output, Strands multi-agent orchestration (bounded), tiktoken/cost, grounding. Defers retrieval to search-vector.Read, Grep, Glob, Bashorg scan: apps/assistant-ai, with-agents*
23search-vectorwrittenOpenSearch full-text + vector, Voyage embeddings, index mappings (he/en analyzers), relevance, freshness, query-time scoping, RAG retrieval. Pairs with ai-llm (retrieve vs generate).Read, Grep, Glob, Bashorg scan: apps/vector-search
24integrationswrittenExternal-system boundary — inbound/outbound webhooks (verify+idempotent), CRM sync (Monday.com field-mapping), BSP/Meta connectors, outbound resilience. Defers delivery→async-messaging, PII→privacy-compliance.Read, Grep, Glob, Bashorg scan: crm-integration + BSP
25mobile-developerwrittenFlutter/Dart (leaders-app GetX/SSE/region-aware Β· consumer-mobile Provider-Riverpod/Dio/Firebase-off); consumes shared /api/v2 (no BFF), JWT+refresh, offline states, he/en, store release.inherit allorg scan: real Flutter repos
26frontend-angularwrittenAngular 8 (superco-management) β€” DEPRECATION TARGET: bug fixes / smallest-safe-change only, NO new features (new UI = React via iframe). ng-zorro/Material/RxJS era patterns.Read, Grep, Glob, Bash, Editorg scan: superco-management

The roster above is reconciled to docs/methodology/agent-taxonomy.md (ADR-002), which is the source of truth for the decomposition principle, ownership boundaries, and impact-ordered build sequence. Rows flip planned β†’ written as each agent ships. (frontend-developer row 5 covers the React/Next family; embedded-widgets is a shared rule, not an agent β€” OQ-2.)

Sequencing rationale​

The order above is sized by load-bearing first. Agents the Policy Engine fires automatically for every relevant change come first:

  • process-guardian β€” runs at /done on every closing task. Smallest scope. Written first as the test of the template.
  • code-reviewer β€” runs before every PR open. Highest call frequency in the whole roster.
  • architect β€” runs on every design-affecting change. Sets the bar for "do we know what we're building."
  • backend-developer / frontend-developer β€” pair-load on most implementation tasks.
  • qa-engineer β€” runs whenever behavioral code changes.

The domain specialists (rows 8–16) come after the load-bearing five because they load only when the Policy Engine's triggers match their narrower scope.

Roster changes (2026-05-27/28):

  • Removed team-leader β€” no cross-team / stage-approval reality for a single-developer team. Priority decisions between unrelated tasks moved to product-manager.
  • Removed decision-recorder as an agent β€” replaced by an /adr skill plus a rule carried by architect and product-manager. Mechanical ADR creation is a procedure, not a judgment role.
  • Added design-system β€” consolidates UX, component library, and Storybook conventions under one owner (per the consolidate-by-default heuristic).
  • Added privacy-compliance β€” GDPR and Israeli Privacy Law coverage that no existing agent held.
  • Added contracts-schema β€” active oversight of FE↔BE and inter-service contract discipline. Scope finalised with Aviad: no codegen, no version standardization; the agent scans all repos and updates consumers on breaking changes.

Conventions for adding an agent​

  1. Read the agent template first. The seven body sections β€” Role β†’ When invoked β†’ Checklist β†’ Output format β†’ Handoff points β†’ Cross-references β†’ Anti-patterns β€” are the writing convention. Frontmatter is enforced by Claude Code.
  2. Pick a kebab-case name. It becomes the filename and the name: frontmatter field. Both must match.
  3. Write the description: for routing. Include "use proactively" if you want auto-delegation. Mention specific trigger context (when to load, what stack/files).
  4. Pick tools: deliberately. A reviewer/gatekeeper should not have Edit/Write. An implementer needs all default tools.
  5. Source the body. Most agents have an existing source (see Source column). The rewrite is to the BeWith template, not from scratch β€” preserve the domain content; normalize the structure.
  6. Reflect the actual BeWith projects. Reference real repos (backend-services, management-webapp, consumer-php-base, etc.), real commands (pnpm lint, composer test), real validators (scripts/checks/check-cu-id.sh), real env vars (REQUIRE_CU_ID in git-hooks/config.env). Generic agents that could apply anywhere are weaker than specific ones that name the platform.
  7. Size discipline. Target 15–25 KB. If you blow past 30 KB, ask whether a sibling skill or a sub-doc could carry weight.
  8. Add a row above with the new file linked and Status flipped to written.
  9. Cross-reference forward. Section 6 of the template links every agent this one hands off to. If a target agent does not yet exist, link to its planned filename β€” IDE diagnostics will flag broken links, which is the intended signal (they resolve as the roster fills).

How the Policy Engine loads agents​

Each policy in /policies declares required_agents by name (kebab-case, no extension). At step 4 of /continue the engine evaluates which policies match the proposed work; at step 5 it loads every agent in the aggregated required_agents set. Lazy loading means a single-file edit may load only code-reviewer and process-guardian; a schema migration loads database + backend-developer + code-reviewer + process-guardian. The whole 15-agent body never loads simultaneously.

See policy-engine.md for the aggregation algorithm.