AGENTS.md TemplatesTemplate

AGENTS.md Template — Micro Frontend Architecture for AI coding agents

AGENTS.md Template for micro frontend architecture to orchestrate AI coding agents across multiple micro frontends with handoffs and governance.

AGENTS.md Templatemicro frontendAI coding agentsmulti-agent orchestrationagent handoffstool governancememorysecuritydeploymentQA

Target User

Developers, engineering leaders, platform teams

Use Cases

  • Orchestrating micro frontend architectures with AI agents
  • Handoff flows between planner, implementer, reviewer, tester, researcher, domain specialist
  • Tool governance and secrets management

Markdown Template

AGENTS.md Template — Micro Frontend Architecture for AI coding agents

# AGENTS.md
Project role: Frontend Platform Lead

Agent roster and responsibilities
- Orchestrator: coordinates tasks, enforces memory, handles handoffs
- ShellAgent: provides host shell for micro frontends
- AppAgent-: responsible for integrating a specific micro frontend app
- AssetLoaderAgent: loads assets and ensures cache correctness
- InteractionAgent: validates UI interactions
- ResearchAgent: investigates integration patterns
- DomainAgent: handles domain-specific constraints

Supervisor or orchestrator behavior
Orchestrator maintains plan, assigns tasks, monitors progress, triggers escalation if timeouts

Handoff rules
After task completion, task results and context are passed to next agent; use a handoff packet with memory pointer, sources, and acceptance criteria

Context, memory, and source-of-truth rules
Single source of truth repo; memory store per run; memory cleanup; sources: design docs, API specs, contracts

Tool access and permission rules
Tools allowed: code repo write only in assigned area; read-only for others; secrets in vault; external services access controlled by policy

Architecture rules
Module Federation; shared libs; version alignment; consistent naming across apps

File structure rules
Root: frontend shells, apps, shared libs, agents, infra

Data, API, integration rules
Use JSON API bridges; ensure CORS and consistent contracts

Validation rules
Unit tests, integration tests, UI checks

Security rules
Content security policy; origin checks; secrets management

Testing rules
Unit tests, integration tests, visual tests

Deployment rules
Gating, canary, rollback

Human review and escalation rules
Platform Lead escalation if critical issues arise

Failure handling and rollback rules
Capture failure, revert to last known good, notify stakeholders

Things Agents must not do
Do not leak secrets; do not perform production changes without approvals; do not duplicate work; do not drift from architecture

Overview

AGENTS.md Template for micro frontend architecture governs the workflow of AI coding agents coordinating multiple micro frontends. It supports both individual agents and multi-agent orchestration with handoffs and tool governance.

When to Use This AGENTS.md Template

  • You are building a micro frontend architecture with several standalone apps sharing components and runtime behavior.
  • You need disciplined handoffs, governance, and auditability for AI coding agents.
  • You require reproducible decision making and memory across runs in multi-agent orchestration.
  • You want to enforce security, deployment checks, and human review gates across frontend apps.

Copyable AGENTS.md Template

# AGENTS.md
Project role: Frontend Platform Lead

Agent roster and responsibilities
- Orchestrator: coordinates tasks, enforces memory, handles handoffs
- ShellAgent: provides host shell for micro frontends
- AppAgent-: responsible for integrating a specific micro frontend app
- AssetLoaderAgent: loads assets and ensures cache correctness
- InteractionAgent: validates UI interactions
- ResearchAgent: investigates integration patterns
- DomainAgent: handles domain-specific constraints

Supervisor or orchestrator behavior
Orchestrator maintains plan, assigns tasks, monitors progress, triggers escalation if timeouts

Handoff rules
After task completion, task results and context are passed to next agent; use a handoff packet with memory pointer, sources, and acceptance criteria

Context, memory, and source-of-truth rules
Single source of truth repo; memory store per run; memory cleanup; sources: design docs, API specs, contracts

Tool access and permission rules
Tools allowed: code repo write only in assigned area; read-only for others; secrets in vault; external services access controlled by policy

Architecture rules
Module Federation; shared libs; version alignment; consistent naming across apps

File structure rules
Root: frontend shells, apps, shared libs, agents, infra

Data, API, integration rules
Use JSON API bridges; ensure CORS and consistent contracts

Validation rules
Unit tests, integration tests, UI checks

Security rules
Content security policy; origin checks; secrets management

Testing rules
Unit tests, integration tests, visual tests

Deployment rules
Gating, canary, rollback

Human review and escalation rules
Platform Lead escalation if critical issues arise

Failure handling and rollback rules
Capture failure, revert to last known good, notify stakeholders

Things Agents must not do
Do not leak secrets; do not perform production changes without approvals; do not duplicate work; do not drift from architecture

Recommended Agent Operating Model

In this micro frontend AGENTS.md Template, define clear roles and decision boundaries for planner, implementer, reviewer, tester, researcher, and domain specialist agents. The orchestrator coordinates, stores context, and mediates handoffs. Escalation follows a deterministic path when issues exceed thresholds.

Recommended Project Structure

/
  apps/
    shell/
      src/
        index.html
    app1/
      src/
    app2/
      src/
  packages/
    shared/
  agents/
    planner/
    implementer/
    reviewer/
    tester/
    researcher/
    domain-specialist/
  infra/
  docs/

Core Operating Principles

  • Single source of truth for task state and decisions
  • Deterministic outputs with explicit acceptance criteria
  • Strict access controls and auditable traces
  • Clear ownership and escalation paths

Agent Handoff and Collaboration Rules

  • Planner creates tasks with acceptance criteria and constraints
  • Implementer builds UI integration and passes artifacts to Reviewer
  • Reviewer checks quality and passes to Tester
  • Tester executes automated and manual checks, then passes to Researcher or Domain Specialist as needed
  • Orchestrator coordinates memory, versions, and cross-app consistency

Tool Governance and Permission Rules

  • Only approved tools may be invoked; secrets must be retrieved from vault
  • Code edits are allowed only in assigned directories
  • APIs must use approved endpoints with audit trails
  • Production access requires approvals and change control

Code Construction Rules

  • Follow component-based design; align with micro frontend boundaries
  • Respect shared library contracts and version pinning
  • Avoid global mutations; use immutability where possible
  • Document interfaces and data contracts

Security and Production Rules

  • Enforce content security policy and strict origin checks
  • Secrets stored securely; do not log sensitive data
  • Rollout and rollback procedures with monitoring

Testing Checklist

  • Unit tests for each micro frontend
  • Integration tests for inter-app communication
  • Visual regression tests for UI consistency
  • End-to-end tests for user flows across apps

Common Mistakes to Avoid

  • Untracked cross-app dependencies
  • Ignoring de-duplication in shared libraries
  • Overfitting to a single framework
  • Skipping human review for critical changes

Related implementation resources: AI Use Case for Corporate Event Managers Using Slack To Orchestrate Day-Of Venue Tasks Across Multi-Department Teams and AI Agent Use Case for Wholesalers Using Multi-Currency Ledger Trackers To Calculate Foreign Exchange Risk Exposure Across Global Accounts.

FAQ

What is this AGENTS.md Template for micro frontend architecture?

A copyable operating manual that governs AI coding agents coordinating multiple micro frontend apps with clear handoffs, governance, and validation.

How does multi-agent orchestration work in this template?

An orchestrator coordinates planner, implementer, reviewer, tester, researcher, and domain specialist agents to deliver a cohesive frontend experience.

What are handoff rules between agents?

Handoffs pass task state, artifacts, and acceptance criteria; the receiving agent acknowledges before proceeding.

What about security and production?

Secrets are vault-protected, production changes require approvals, and all tool invocations are auditable with rollback options.

How do I validate and deploy?

Run unit and integration tests, verify UI behavior across apps, and follow gated deployment processes with rollback on failure.